Unplugging serial screws up 12F675


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Posts
    11

    Default Unplugging serial screws up 12F675

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    A similar problem was posted here: http://www.avrfreaks.net/index.php?n...topic&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.

  3. #3
    Join Date
    Jan 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    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)

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Max 233 does not need caps.
    More than 8 pins though.
    http://datasheets.maxim-ic.com/en/ds/MAX220-MAX249.pdf
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Idle state

    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
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts