puddlehaven
Member
I spent the last couple of nights troubleshooting a frustrating problem with serial commuications. No matter what I tried, I could not get an 18X receive data from my PC on any pin other than the programming serial in pin. I could send data, I could program the Picaxe, I just couldn't get the Picaxe to hear the PC using the SERIN command.
I looked through the forums and found some older threads about troubleshooting the serial inteface and tried all the things mentioned in there. I did all of the following:
Finally, I checked the idle voltage on my serial cable. I use an Airlink 101 USB-to-serial adapter, and it showed an idle voltage around -6 volts. I dug up an old "Getting Started With Electronics" book I have (by Forrest Mimms!) to look up voltage dividers and figured out that my Picaxe was seeing 1.875 volts instead of 3.75 volts.
Thinking that may be the problem, I reversed the resistors in the voltage divider on the serial input pin. If I figured it out right, now my Picaxe is seeing 4.125 volts.
Switching the resistors on the voltage divider worked, and my Picaxe is now receiving data from the PC. The problem is, I'm not sure if what I did was the right thing. Every serial circuit I've seen for the Picaxe has a 22K resistor in front of the input pin and a 10K resistor to ground. By swapping them am I putting my Picaxe in danger? If so, what should I do instead?
Thanks,
Chuck
I looked through the forums and found some older threads about troubleshooting the serial inteface and tried all the things mentioned in there. I did all of the following:
- Make sure the 18X could be programmed, it could.
- Set up another Picaxe and run serial comms through it. That worked fine.
- Loopback the serial cable and test that characters sent from the terminal came back to the terminal. They did.
Finally, I checked the idle voltage on my serial cable. I use an Airlink 101 USB-to-serial adapter, and it showed an idle voltage around -6 volts. I dug up an old "Getting Started With Electronics" book I have (by Forrest Mimms!) to look up voltage dividers and figured out that my Picaxe was seeing 1.875 volts instead of 3.75 volts.
Thinking that may be the problem, I reversed the resistors in the voltage divider on the serial input pin. If I figured it out right, now my Picaxe is seeing 4.125 volts.
Switching the resistors on the voltage divider worked, and my Picaxe is now receiving data from the PC. The problem is, I'm not sure if what I did was the right thing. Every serial circuit I've seen for the Picaxe has a 22K resistor in front of the input pin and a 10K resistor to ground. By swapping them am I putting my Picaxe in danger? If so, what should I do instead?
Thanks,
Chuck