1
\$\begingroup\$

I am designing a UI PCB which has an MCU which will interface with a main system controller (MSC) on a separate PCB. The UI PCB provides an initial power up to the MSC which then boots up its onboard PSU and everything else. Additionally it should read messages from the main system controller to provide on the UI (LED's, display etc.). Finally it has buttons to power on, or reset the main system controller.

The UI PCB communicates with the MSC using CAN bus. I was just wondering if I would need additional IO's between the two PCBs? Can I send the data from the buttons on the UI board (like if it was being used as a state machine) as a message on CAN bus? Or would using a simple GPIO make more sense for this?

\$\endgroup\$
8
  • \$\begingroup\$ Please edit to explain what a PCBA is. \$\endgroup\$
    – Transistor
    Apr 12, 2021 at 8:18
  • \$\begingroup\$ Assembled pcb's. I've just replaced it with pcb. \$\endgroup\$
    – Hasman404
    Apr 12, 2021 at 8:27
  • \$\begingroup\$ surely you should ask the software people who are probably more familiar with the capabilities of the CAN bus \$\endgroup\$
    – user253751
    Apr 12, 2021 at 8:48
  • 4
    \$\begingroup\$ @Transistor, PCBA is a standard industry term for PCB Assembly, been in use for many decades \$\endgroup\$
    – TonyM
    Apr 12, 2021 at 8:58
  • \$\begingroup\$ @user253751, understanding CAN isn't a more-hardware or more-software thing, it's a simple enough bus. Here, the OP's asking about electronic circuit design, not software design. \$\endgroup\$
    – TonyM
    Apr 12, 2021 at 11:14

1 Answer 1

1
\$\begingroup\$

Can I send the data from the buttons on the UI board (like if it was being used as a state machine) as a message on CAN bus?

Yes, you can.

Or would using a simple GPIO make more sense for this?

I might make more sense if the CAN bus transmission rate was limited to some particularly slow speed and potentially gave the impression to the user (as in UI) that the interface was a little bit sluggish. If not, go for CAN bus for everything (or, generally, whatever serial data link is being used).

If you have spare IO on the UI and you can easily route it to your MSC, then why not route it (just in case you do need future expandability).

\$\endgroup\$
1
  • 2
    \$\begingroup\$ The lowest standardized CAN baudrate is 10kbps. If you pick 1 byte payload (8 buttons) you get 56 bits package (ignoring stuffing). Then it takes 56ms to transfer such a package. Humans start to notice delays somewhere around 150ms, so there would still be a huge margin even if you have some ~20ms debouncing. \$\endgroup\$
    – Lundin
    Apr 13, 2021 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.