View Full Version : Unplugging serial screws up 12F675
anode505
- 30th June 2010, 16:40
I have a temp control, where I will use a laptop to change the temp via a serial interface (just the 1K & 22K resistors straight to pins.)
But when I unplug the serial connection it 'sends' a new temp. Typically 204, 255, or 112 are the values that get entered.
It a USB to serial on the 'puter side. I tried unplugging the USB end and serial end, same prob.
Its running at 2400bps
Ideas? Can go slower baud if that would help. Pull ups/downs?
TIA,
Dave
ScaleRobotics
- 30th June 2010, 17:24
A similar problem was posted here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=682240
Sounds like the best way is to have your application filter it's input, so any time you change temp with the computer (on purpose), your PC's characters are followed by a sequence of characters. If this sequence is incorrect, your application does not change the temp.
anode505
- 1st July 2010, 00:27
Thanks for the link. Shed a little light on the subject. I was thinking of adding a max232 (do they make an 8 pin version that doesn't require extern caps?)
I think for now I'm going to change temp, turn the unit off, unplug and turn on. (hopefully it will work. I need to get this online) Its not something that will need many changes.
(long term is a Xbee)
mackrackit
- 1st July 2010, 01:08
Max 233 does not need caps.
More than 8 pins though.
http://datasheets.maxim-ic.com/en/ds/MAX220-MAX249.pdf
Archangel
- 1st July 2010, 08:55
Hi anode505,
Be sure your serial input port idles in the correct state, USART confers data TRUE so it idles high via the pull up resistor YOU supply whereas INVERTED idles low through the Pull Down resistor you supply.
HTH
JS
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.