Hserin not working...


Closed Thread
Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2005
    Posts
    23

    Default Hserin not working...

    I'm going crazy for HSERIN .......
    this piece of code is fully working on portC.6 and portC.7 ( using in a pic16F876 the usart ports at 20 Mhz)
    ...
    serout2 out,84, ["C",13]
    gosub wait_char
    .....
    Wait_char
    serin2 in,84,500,wait_timeout,[wait(">")]
    return

    THEN i want to use the usart hardware at same speed so:
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1

    and
    ....
    hserout ["C",13]
    gosub wait_char
    ...
    wait_char:
    hserin ,500,wait_timeout,[wait(">")]
    return

    and here the problem...Hserout is working, i can see tha data on a display ,but Hserin not at all, goin' always on wait_timeout ( where i put a led to see if program is passing over there..).
    I tried to change the time of timeout, and using the same ports i'm sure that are working well because serin2 is ok, all useless.

    Anyone could point me to the light ....:-)
    Thanks in advance.

    P.s.
    i forgot to say that communication between pic and the device is at TTL level, in serin2 as well as in Usart Hserin. So at this moment NOT using a max232.
    Last edited by robert0; - 22nd August 2005 at 12:43.

Similar Threads

  1. Hserin with Instant Interrupts.
    By ronjodu in forum Serial
    Replies: 17
    Last Post: - 30th December 2014, 20:17
  2. HSERIN and XOUT command
    By aratti in forum General
    Replies: 20
    Last Post: - 12th May 2009, 11:58
  3. 16F877a Interupt driven Hserin
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd November 2006, 00:38
  4. Can a TMR interrupt stops HSERIN?
    By SergioRM in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th January 2006, 01:07
  5. Hserin
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th November 2004, 15:42

Members who have read this thread : 1

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