Help with a draft of a robóvia rf


Closed Thread
Results 1 to 40 of 40

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Post the Pic Bacic code, not the ASM it generates.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Red face ruf-bot

    Dear mackrackit I'm very difficulties of the code intend to do that.
    which commands. that missing to set the program's peak. " I thank you for everything.
    Attached Images Attached Images   

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


    Did you find this post helpful? Yes | No

    Default

    Post the Pic Basic code so we can see where you are at.

    Also, for testing, connect the two PICs with wires and not radio.
    The problem may be in the radio setup. Get it working hardwired first.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Red face ruf-bot

    The Modolo tws433mhz and rws433mhz ok.
    The clerical error codes has or has not

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


    Did you find this post helpful? Yes | No

    Default

    How do you know the radios are working?

    The only way anyone will be able to help you is if you post your code.

    Until then have fun.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Red face ruf-bot

    Dear mackrackit I tried the Modolo with a program of 8 led E8 chave.teste.
    thanks
    ' RX CODE:
    'DEFINE OSC 4
    '@__config _XT_OSC & _WDT_ON & _CP_OFF

    'symbol trisb = 134
    'symbol trisa = 133
    'symbol portb = 6
    'symbol porta = 5
    'poke trisa, 0
    'poke porta, 0
    'low 0
    'input 1

    'prestart: ;detta händer före start
    'pause 400 ;Pausar 400mS
    'poke porta, 10 ; gör nått med I/O RB4
    'pause 200 ;Pausar 200mS
    'poke porta, 5 ; gör nått med pin 5 (Vss)
    'pause 200 ;Pausar 200mS
    'poke porta, 6 ; gör nått med I/O RB0/INT
    'pause 200 ;Pausar 200mS
    'poke porta, 9 ; gör nått med I/O RB3
    'pause 200 ;Pausar 200mS
    'poke porta, 0 ; gör nått med ?något?!
    'pause 200 ;Pausar 200mS

    'start: ;programmet startar
    'serin 1,n9600,B0 ; man berättar för picen vart man ska ta in informationen
    'if B0 = 1 then forward ;om man får in en 1:a så hoppar man till forward
    'if B0 = 2 then backward ;om man får in en 2:a så hoppar man till backward
    'if B0 = 3 then left ;om man får in en 3:a så hoppar man till left
    'if B0 = 4 then right ;om man får en 4:a så hoppar man till right
    'if B0 = 5 then nomove ;om man får in en 5:a så hoppar man till nomove
    'goto start ;Picen hoppar nu till start

    'forward:
    'poke porta, 10 ;Här skickar picen ut nått så att den går framåt (poke?)
    'goto start ; Gå tillbaka till start

    'backward:
    'poke porta, 5 ;Här skickar picen ut nått så att den går bakåt (poke?)
    'goto start ; Gå tillbaka till start

    'right:
    'poke porta, 6 ;Här skickar picen ut nått så att den går åt höger (poke?)
    'goto start ; Gå tillbaka till start

    'left:
    'poke porta, 9 ;Här skickar picen ut nått så att den går åt vänster (poke?)
    'goto start ; Gå tillbaka till start

    'nomove:
    'poke porta, 0 ;Här skickar picen inte ut nått vilket resulterar i att den står still
    'goto start ;Gå tillbaka till start
    'end

    ' TX CODE:
    'DEFINE OSC 4
    '@__config _XT_OSC & _WDT_ON & _CP_OFF

    'symbol trisb = 134
    'symbol trisa = 133
    'symbol portb = 6
    'symbol porta = 5
    'low 1
    'input 0
    'input 2

    'start:
    'pot 0,50,B0 ; berättar på vilken I/O ena potten finns

    'pot 2,50,B1 ; berättar på vilken I/O andra potten finns
    'B0 = B0 * 5
    'B1 = B1 * 5
    'y:
    'if B0 < 100 then yf ; om man drar potten på B0 framåt så hoppar picen till yf
    'if B0 > 150 then yb ; om man drar potten på B0 bakåt så hoppar picen till yb

    'x:
    'if B1 < 100 then xr ; om man drar potten på B1 åt höger så hoppar picen till xr
    'if B1 > 150 then xl ; om man drar potten på B1 åt vänster så hoppar picen till xl
    'serout 1,n9600,(5) ; den skickar (5) till mottagaren som gör att den står still
    'goto start ; Picen hoppar tillbaka till start

    'yf:
    'serout 1,n9600,(2) ; den skickar (2) till mottagaren som gör att den kör framåt
    'goto start

    'yb:
    'serout 1,n9600,(1) ; den skickar (1) till mottagaren som gör att den backar
    'goto start

    'xl:
    'serout 1,n9600,(3) ; den skickar (3) till mottagaren som gör att den svänger vänster
    'goto start

    'xr:
    'serout 1,n9600,(4) ; den skickar (4) till mottagaren som gör att den svänger höger
    'goto start

    'end

    ' TX CODE:
    'DEFINE OSC 4
    '@__config _XT_OSC & _WDT_ON & _CP_OFF

    'symbol trisb = 134
    'symbol trisa = 133
    'symbol portb = 6
    'symbol porta = 5
    'low 1
    'input 0
    'input 2

    'start:
    'pot 0,50,B0 ; berättar på vilken I/O ena potten finns

    'pot 2,50,B1 ; berättar på vilken I/O andra potten finns
    'B0 = B0 * 5
    'B1 = B1 * 5
    'y:
    'if B0 < 100 then yf ; om man drar potten på B0 framåt så hoppar picen till yf
    'if B0 > 150 then yb ; om man drar potten på B0 bakåt så hoppar picen till yb

    'x:
    'if B1 < 100 then xr ; om man drar potten på B1 åt höger så hoppar picen till xr
    'if B1 > 150 then xl ; om man drar potten på B1 åt vänster så hoppar picen till xl
    'serout 1,n9600,(5) ; den skickar (5) till mottagaren som gör att den står still
    'goto start ; Picen hoppar tillbaka till start

    'yf:
    'serout 1,n9600,(2) ; den skickar (2) till mottagaren som gör att den kör framåt
    'goto start

    'yb:
    'serout 1,n9600,(1) ; den skickar (1) till mottagaren som gör att den backar
    'goto start

    'xl:
    'serout 1,n9600,(3) ; den skickar (3) till mottagaren som gör att den svänger vänster
    'goto start

    'xr:
    'serout 1,n9600,(4) ; den skickar (4) till mottagaren som gör att den svänger höger
    'goto start

    'end

    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    You have not made the variables. Please look at the manual.
    And why do all of the lines have a comment " ' " ?

    Du har inte gjord den växlande. Behaga blick for handboken. Och varför gör all om linjen har en kommentera " ' "?
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Control NEXA 230V RF Switch
    By Fredrick in forum Code Examples
    Replies: 3
    Last Post: - 7th December 2009, 00:19
  2. Generic RF Receiver
    By dhouston in forum Code Examples
    Replies: 0
    Last Post: - 8th September 2009, 15:35
  3. Interfacing 16F88 to RF module
    By scomi85 in forum General
    Replies: 2
    Last Post: - 19th February 2009, 13:52
  4. RF Module
    By shahidali55 in forum General
    Replies: 22
    Last Post: - 9th March 2007, 10:00
  5. Interfacting RF Module
    By rastan in forum General
    Replies: 8
    Last Post: - 10th November 2004, 23:27

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