RX interrupt


Closed Thread
Results 1 to 7 of 7

Thread: RX interrupt

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    And I don't know your hardware - but. You can't run the output of a PC serial port directly into a hardware serial port of a PIC, even with a resistor. The PC output is LOW when no character is transmitted, while the PIC expects a HIGH when no character is transmitted. If you use a level-shifter/inverter like a MAX232 between your PIC and PC, you don't need a resistor (pull-up or otherwise), and the inversion will be taken care of for you.
    Charles Linquist

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    And I don't know your hardware - but. You can't run the output of a PC serial port directly into a hardware serial port of a PIC, even with a resistor. The PC output is LOW when no character is transmitted, while the PIC expects a HIGH when no character is transmitted. If you use a level-shifter/inverter like a MAX232 between your PIC and PC, you don't need a resistor (pull-up or otherwise), and the inversion will be taken care of for you.
    Or you could use a transistor to invert the P/C's inverted logic back to true. I first saw this method employed by P H Anderson in a serial LCD backpack I bought from him. Wulfden sells kits,based on his chips, and the schematic can be found here in his manual: http://www.wulfden.org/downloads/manuals/K107manual.pdf
    If you go there be sure to visit his products page. He even sells the bare PCB if you don't want the kits.
    http://www.wulfden.org/TheShoppe/products.shtml
    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.

  3. #3
    Join Date
    Mar 2010
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Serial data is transmitted wireless from my computer to the pic, using Xbee modules. The transmission is working fine, atleast the characters from the pic get correctly received. The PIC is interrupting, do some action, and resume back normally, when receiving something on UART. However i dont know yet if the incomming serial data is correct.

    I put this code in the interrupt section
    Code:
    HSERIN [WAIT("*"),STR serdata\4]
    hserout ["=",str serdata\4]
    But it doesnt return anything. For example, i send the following sequence:
    "*1234" it should return 1234. But it doesnt.

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  4. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 02:59
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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