justDIY
Active Member
a project i'm working on uses a high side switch to turn a radio connected to the uart on and off.
since I don't have the radio yet, I was testing it using small st232a level shifter board I tossed together some time ago.
the test involves powering up the connected device, turning on the serial port in the pic, transmitting some data, and then shutting the serial port and connected device down. the device is "shutdown" by disconnecting Vdd (+5v) with a p channel mosfet, driven by the pic.
the detailed procedure goes like this:
1) turn on the pfet, powering up the device
2) wait 5 ms for device to power up
3) (re) set RX pin to input and TX pin to output, both are set to input at power off
4) set bit SPEN, turning the uart on
5) send some data
6) turn off the pfet, powering down the device
7) wait 5 ms
8) clear SPEN, turning uart off
9) set RX and TX pins to high-z inputs
wait one minute, and repeat
this ran for a few minutes, then I started getting garbage during the shutdown. now the RX side (pc -> pic) of the max232 is fried, the pic can still transmit data pic -> pc, but can't receive anything
I confirmed it was the st232 that failed by using a max232 built onto a protoboard, everything works as expected. the second board was powered continuously in case it was the power on/off that damaged the first one.
I don't see anything in the datasheet that would indicate the max232 could be damaged by disconnecting Vdd while still connected to an rs232 interface.
Any thoughts on what happened?
since I don't have the radio yet, I was testing it using small st232a level shifter board I tossed together some time ago.
the test involves powering up the connected device, turning on the serial port in the pic, transmitting some data, and then shutting the serial port and connected device down. the device is "shutdown" by disconnecting Vdd (+5v) with a p channel mosfet, driven by the pic.
the detailed procedure goes like this:
1) turn on the pfet, powering up the device
2) wait 5 ms for device to power up
3) (re) set RX pin to input and TX pin to output, both are set to input at power off
4) set bit SPEN, turning the uart on
5) send some data
6) turn off the pfet, powering down the device
7) wait 5 ms
8) clear SPEN, turning uart off
9) set RX and TX pins to high-z inputs
wait one minute, and repeat
this ran for a few minutes, then I started getting garbage during the shutdown. now the RX side (pc -> pic) of the max232 is fried, the pic can still transmit data pic -> pc, but can't receive anything
I confirmed it was the st232 that failed by using a max232 built onto a protoboard, everything works as expected. the second board was powered continuously in case it was the power on/off that damaged the first one.
I don't see anything in the datasheet that would indicate the max232 could be damaged by disconnecting Vdd while still connected to an rs232 interface.
Any thoughts on what happened?