usart not workin


Closed Thread
Results 1 to 4 of 4
  1. #1
    parinshah's Avatar
    parinshah Guest

    Default usart not workin

    hi frends, i m using usart module in my project. to varify that usart is working or not i wrote a simple code which is
    LOOP: IF PORTC.7=0 THEN REC
    GOTO LOOP
    REC: PORTB=$00
    PORTA=$00
    PORTA=$3F
    PAUSE 2000
    SERIN PORTC.7,T9600,[0],B0
    J1=B0
    PORTB=J1
    SEROUT PORTC.6,T9600,[J1]
    GOTO LOOP
    i m usnig teminator software wich transmits n receives data serialy,i m using pic16f876.i m nt able to receive n transmitt properly.data comes till rc7 pin bt isnt getting stored or transmitted.wht shld i do.please kindly reply i m stuck n i cnt go further,i hv my deadline to submit the project very near.
    thankin in anticipation. luv,parin
    Last edited by parinshah; - 6th April 2006 at 10:53.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358

    Default

    USART isn't working because you're not using it.

    Compare the commands you have used against the PICBasic manual to discover what you have doen.

  3. #3
    parinshah's Avatar
    parinshah Guest

    Question thanks

    Quote Originally Posted by Melanie
    USART isn't working because you're not using it.

    Compare the commands you have used against the PICBasic manual to discover what you have doen.
    thank u very much for ur kind concerns madam.i got ur point but this is how the serial i/o r define in manual(serin pin,mode[qualifier][item])
    my syntex is
    serin portc.7,t9600,[0],{bo}
    wherin b0 is a variable wher byte vl b stored after the start bit(0) detected on rc7 pin.kindly reply what is the mistake.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358

    Default

    SERIN or SEROUT does not use the USART.

    Apart from that, you detect Data comming in at the start of your code then WAIT TWO SECONDS before you try to grab it. It's long gone and history by the time you even get to the SERIN command.

Similar Threads

  1. byte Tx w/ USART 16f876a problem
    By GargamelDigi in forum mel PIC BASIC
    Replies: 2
    Last Post: - 15th July 2008, 05:50
  2. problem with USART
    By leemin in forum Serial
    Replies: 4
    Last Post: - 11th December 2006, 17:56
  3. I ammm Looosssst (USART Help)
    By shawn in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th May 2006, 05:05
  4. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07
  5. Replies: 5
    Last Post: - 1st December 2004, 12:49

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