Tws 434/ Rws 434


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Quote Originally Posted by dhouston View Post
    Manchester encoding is not a requirement. They are used extensively without it.
    Agreed. When I was having my problems with SERIAL, tested RF by simply sending a high bit.

    Kind of like Morse code. Instead of "..._ _ _..." it was "... ..."
    DOTS = HIGH
    Dave
    Always wear safety glasses while programming.

  2. #2

    Default

    sorry for the late reply, i have not had time to work on this till now.


    so it tried what you said and sent %10101010 to stabalize the oscillators, (put it in the neutral zone). and now i am able to get something on the other end of the pic. however i can't seem to get it continously. in my sample program i am counting numbers continously in my transmitter side and sending it to my reciever to display it. it sends numbers but it does not send it continously.

    i.e i send 1,2,3,4,5,6,7,8,9,10 and will recieve 1, 4, 6,9

    how do i make my program more stable.

    '=====transmitter=====
    junk = $55
    synch = "a"
    dat = 0
    loopa:
    pause 1000
    serout tx, N2400, [junk, junk, junk, junk, junk, synch, dat]
    dat = dat + 1
    if dat = 255 then dat = 0
    goto loopa

    '=====reciever======
    synch = "a"
    dat = 0
    begin:
    serin rx, 4, [synch], dat
    pause 5:serout2 LCD, baud, ["start", 1, DEC (dat), 0]
    goto begin

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    For small amounts of data I prefer using the NEC protocol which has been around since the dawn of remote control and has been widely used by manufacturers of audio/visual gear.

    I posted a short example for sending/receiving in the Code Examples forum.

    http://www.picbasic.co.uk/forum/showthread.php?t=6261

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    After re-reading this I noticed
    I tried my program directly from pic to pic and it works fine, the problem is when i add these 2 modules then it doesn't work. I am using the 12F683 with a 4 MHZ internal osc.
    The internal osc will sometimes work and sometimes not. To be safe use an external osc. The ones with three pins have built in caps and prove to be stable.

    At some point you will need a protocol like dhouston mentioned. Here is a link that has a lot of good reading http://www.linxtechnologies.com/Supp...ication-Notes/
    App notes AN-00160 an AN-00232 might be of interest.

    But...for sending one or two characters of data you should be "OK" if there is not out side interference. I send numbers like 11, 12, 13 or strings "HI" and so on with out using any protocol and works fine.
    Try changing the osc and look at dhoustons link, good example.
    Dave
    Always wear safety glasses while programming.

  5. #5

    Default

    i have 20MHz crystalz. Do i have to define 20Mhz in PBP or can i define 4Mhz.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Quote Originally Posted by jmbanales21485 View Post
    i have 20MHz crystalz. Do i have to define 20Mhz in PBP or can i define 4Mhz.
    Yes and no. I say this as some play with different speeds (over-clocking )or for some other reason. In you case
    Code:
    DEFINE OSC 20
    in PBP.

    Also you will need to change you *inc file to HS_OSC. Or read this for more on the configuration methods. http://www.picbasic.co.uk/forum/show...=6775#post6775
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Replies: 2
    Last Post: - 29th September 2007, 06:49

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