Serial Data for PIC16LF84A


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    I wrote some test code for a transmitter and receiver,

    Transmitter:
    Include "Modedefs.bas"
    START:
    serout Portb.3, t2400, ["A", 1010]
    Pause 1
    serout Portb.3, t2400, ["A", 1010]
    Pause 1
    GOTO START

    Receiver:
    Include "Modedefs.bas"
    B0 var portb.1
    serin portb.0, t2400,["A"], B0

    I would like to read a the first bit in B0 how would I be able to do it? Do I need to store it somewhere temporarily?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oneohthree View Post
    I wrote some test code for a tx and rx,

    Transmitter:
    Include "Modedefs.bas"
    START:
    serout Portb.3, t2400, ["A", 1010] : Pause 1 : serout Portb.3, t2400, ["A", 1010] : Pause 1 : GOTO START

    Receiver:
    Include "Modedefs.bas"
    B0 var portb.1 : serin portb.0, t2400,["A"], B0

    I would like to read a the first bit in B0 how would I be able to do it? Do I need to store it somewhere temporarily?
    You didn't read any of those RF module posts completely...did you?
    'cause, for the most part, what you've got above won't work
    Main problem, just like it says in all those posts, no preamble for the recevier's data slicer.
    Oh, don't get me wrong, it might work. I'd bet money it won't.

    What's the purpose of: serout Portb.3, t2400, ["A", 1010]
    explain it to me so I can tell you where you logic is flawed...

  3. #3
    Join Date
    Mar 2007
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    How do I write code for the preamble for the receiver's data slicer? I was thinking of sending a start bit in front, so that serin can know when it should start reading data. I dont know if that is the correct way to do it though.
    Last edited by oneohthree; - 28th March 2007 at 04:25.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oneohthree View Post
    How do I write code for the preamble for the receiver's data slicer? I was thinking of sending a start bit in front, so that serin can know when it should start reading data. I dont know if that is the correct way to do it though.
    RE-READ THE SERIN SEROUT PROBLEM thread that you've been reading. It's all right there. I don't feel like retyping things that have already been done.

    As far as sending the start bit in front so that serin can known when it should start reading data....
    How do you think serial data transmission works? By sending the stop bit first? Not so much....

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 05:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 04:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 03:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 15:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 29th November 2004, 00:56

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