serin


Closed Thread
Results 1 to 3 of 3

Thread: serin

  1. #1
    Join Date
    Jul 2008
    Posts
    2

    Question serin

    Hi Guys,
    You would think this would be easy. So here goes
    First, i am always going to be new to this stuff
    Rules:
    This is TTL-level
    PIC16f87
    RV1 var word ' hopefully receive return value
    RV1 = 0
    baud 9600;parity,none;databit,8;stopbit,none;flowcontro l:none.

    We are sending serial commands [SEROUT] to a processor that work well, we get a sound response.
    I am supposed to receive these "return values" of 0x01, or 0x02 from this serial connection

    So,I wrote:

    SERIN PORTA.2,T9600,RV1

    What should i be receiving on RV1 with those "return values"?

    decimal, ascii, hex, nothing ????

    Thanks

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by buggs View Post
    So,I wrote:
    SERIN PORTA.2,T9600,RV1
    What should i be receiving on RV1 with those "return values"?
    decimal, ascii, hex, nothing ????
    Thanks
    Assuming you receive valid serial data, RV1 will contain the raw value received, not the decimal equivalent, not the hex equivalent, just the straight binary equivalent of whatever was received by the SERIN statement. If you were using a hardware serial port, RV1 would contain whatever was in the RXREG.
    In your case, I would guess that RV1 should contain just what you said, 0x01 (binary 00000001) and so on...
    You can use the modifiers listed in the PBP manual to get them differently if need be...

    Also, see post #16 here...
    http://www.picbasic.co.uk/forum/showthread.php?t=9137
    Last edited by skimask; - 9th July 2008 at 21:46.

  3. #3


    Did you find this post helpful? Yes | No

    Default ser

    don't you have to direct to....

    SERIN PORTA.2,T9600,RV1.byte0

    SERIN PORTA.2,T9600,RV1.byte1

    ?

Similar Threads

  1. Serin EEPROM Programmer
    By dirtbiker5627 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 24th February 2010, 23:48
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  4. Serin with low voltage
    By f_lez in forum General
    Replies: 3
    Last Post: - 21st August 2006, 11:52
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

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