Switch pins + MCU

Post Reply
sebotron
Posts: 44
Joined: Thu Jul 09, 2020 6:57 pm

Switch pins + MCU

Post by sebotron »

Hello! I'd like to operate the switch pins of the FXCore using an MCU. The datasheet says the SWx pins have a weak internal pull up, reading "1", and "0" when pulled to ground. I haven't been able to find info on the value of the pull-up resistor so I was wondering if a GPIO pin sinking current with a logical low would do the job? I'm planning on using an AVR mcu.

Thank you!
Frank
Posts: 159
Joined: Sun May 03, 2015 2:43 pm

Re: Switch pins + MCU

Post by Frank »

In general, yes a micro should have no problem pulling the pin low. A number of people are doing this in their designs.
sebotron
Posts: 44
Joined: Thu Jul 09, 2020 6:57 pm

Re: Switch pins + MCU

Post by sebotron »

Awesome! Thank you Frank!
PhilHaw
Posts: 65
Joined: Thu Mar 07, 2019 5:37 pm

Re: Switch pins + MCU

Post by PhilHaw »

sebotron wrote: Sat Sep 11, 2021 8:09 pm Hello! I'd like to operate the switch pins of the FXCore using an MCU. The datasheet says the SWx pins have a weak internal pull up, reading "1", and "0" when pulled to ground. I haven't been able to find info on the value of the pull-up resistor so I was wondering if a GPIO pin sinking current with a logical low would do the job? I'm planning on using an AVR mcu.

Thank you!
Just be careful if you're using a 5V mcu as the FXCore is a 3.3V device. I've been using a simple passive level shifter.
Philip Hawthorne

Blue Nebula Development Team
Frank
Posts: 159
Joined: Sun May 03, 2015 2:43 pm

Re: Switch pins + MCU

Post by Frank »

PhilHaw wrote: Thu Sep 16, 2021 12:46 pm Just be careful if you're using a 5V mcu as the FXCore is a 3.3V device. I've been using a simple passive level shifter.
^^^^^ This

You can use the simple passive like PhilHaw.

Set the pin on the micro to open collector if possible so it only pulls down and let the internal pull-up in the FXCore pull the line high. Good if micro only drives the pin of the FXCore and not read the line.

Level shifting IC but those would probably only be needed on the SDA line if micro can load code to FXCore since that is bi-directional line.
sebotron
Posts: 44
Joined: Thu Jul 09, 2020 6:57 pm

Re: Switch pins + MCU

Post by sebotron »

Just be careful if you're using a 5V mcu as the FXCore is a 3.3V device. I've been using a simple passive level shifter.
You can use the simple passive like PhilHaw.

Set the pin on the micro to open collector if possible so it only pulls down and let the internal pull-up in the FXCore pull the line high. Good if micro only drives the pin of the FXCore and not read the line.

Level shifting IC but those would probably only be needed on the SDA line if micro can load code to FXCore since that is bi-directional line.
Thank you guys! I normally work with STM32 MCUs but these have gotten especially hard to come by or when you do find some, they've gotten prohibitively expensive. Either way, I was planning on powering an Atmega328p at 3.3v and run it at 8MHz. It should be plenty for simple GPIO.
Post Reply