Help with a draft of a robóvia rf


Closed Thread
Results 1 to 40 of 40
  1. #1
    Join Date
    Aug 2008
    Posts
    81

    Default Help with a draft of a robóvia rf

    Help with a draft of a robóvia rf using RWs and tws-433mhz-433mhz. Link (http://www.rentron.com/ruf-bot.htm).
    not compille on picbasic personal friend to help ...
    A hug

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


    Did you find this post helpful? Yes | No

    Default

    Post the code as you have it along with your configs and chip ID.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    Quote Originally Posted by mackrackit View Post
    Post the code as you have it along with your configs and chip ID.
    I have a lot esperincia in picbasic could help me to compile the code.o brigado ..

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


    Did you find this post helpful? Yes | No

    Default

    One last time...
    I can not compile what I do not see. And I do not even know what chip to compile for.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    Quote Originally Posted by mackrackit View Post
    One last time...
    I can not compile what I do not see. And I do not even know what chip to compile for.
    Receiver Code:

    RX CODE:

    trisb symbol = 134
    Tris symbol = 133
    Portbou symbol = 6
    symbol port = 5
    poke Tris, 0
    poke port, 0
    low 0
    Input 1

    prestart:
    pause 400
    poke port, 10
    pause 200
    poke door, 5
    pause 200
    poke port, 6
    pause 200
    poke door, 9
    pause 200
    poke port, 0
    pause 200

    start:
    Serin 1, n9600, B0
    if B0 = 1 then forward
    if B0 = 2 then backward
    if B0 = 3 then left
    B0 = 4 if then right
    if B0 = 5 then nomove
    goto start

    Forward:
    poke port, 10
    goto start

    backward:
    poke door, 5
    goto start

    right:
    poke port, 6
    goto start

    left:
    poke door, 9
    goto start

    nomove:
    poke port, 0
    goto start
    End

    Transmitter Code:

    TX CODE:

    trisb symbol = 134
    Tris symbol = 133
    Portbou symbol = 6
    symbol port = 5
    1 low
    Input 0
    Input 2

    start:
    0.50 pot, B0

    2.50 pot, B1
    B0 = B0 * 5
    B1 = B1 * 5
    y:
    if B0 <100 then YF
    if B0> 150 then yb

    x:
    if B1 <100 then xr
    if B1> 150 then xl
    serout 1, n9600, (5)
    goto start

    YF:
    serout 1, n9600, (2)
    goto start

    yb:
    serout 1, n9600, (1)
    goto start

    xl:
    serout 1, n9600, (3)
    goto start

    xr:
    serout 1, n9600, (4)
    goto start

    End

    The pic16f84a
    I can not generate the hex to save the pic

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


    Did you find this post helpful? Yes | No

    Default

    The code is not complete. It is just an example on the flow of things.
    B0 for example is a variable bur is has not been declared

    Code:
    B0 VAR BYTE
    And the use of SYMBOL needs to have a Variable declared before hand.

    So read trough the code from the web page and ONLY use it for a guide.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    Quote Originally Posted by mackrackit View Post
    The code is not complete. It is just an example on the flow of things.
    B0 for example is a variable bur is has not been declared

    Code:
    B0 VAR BYTE
    And the use of SYMBOL needs to have a Variable declared before hand.

    So read trough the code from the web page and ONLY use it for a guide.

    You have to help me.
    In the service. The fightin '.

  8. #8
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    You have to help me.
    In the service. The fightin '.
    Edit/Delete Message

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


    Did you find this post helpful? Yes | No

    Default

    Is this the first time you have programmed a PIC?

    If so, then you need to start by making an LED blink.
    Dave
    Always wear safety glasses while programming.

  10. #10
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    I did several projects in asm. I do not have much practice in picbasic. More
    do a very light flashes on facil.em asm.
    And my first project in picbasic.que I try fazer.mais not had much success.
    You could ajuda.impretada.ficarei me very grateful.
    Thank you

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Post

    start:
    0.50 pot, B0

    2.50 pot, B1
    PBP CAN'T understand that ...

    first good reason !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cesar35 View Post
    I did several projects in asm. I do not have much practice in picbasic. More
    do a very light flashes on facil.em asm.
    And my first project in picbasic.que I try fazer.mais not had much success.
    You could ajuda.impretada.ficarei me very grateful.
    Thank you
    OK, Lets get familiar with PBP.
    First read this thread
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    It talks about setting the config bits in your code.
    Then read this
    http://www.picbasic.co.uk/forum/showthread.php?t=561

    Being that you have written in ASM I will assume you have MPASM installed.
    And I will also assume you are also using Micro Code Studio to write your PBP code in.
    In MCS go to view-Compiler Options and make sure the bos "use MPASM" is checked.

    Now the beginning of your code will look something this
    Code:
    DEFINE OSC 4
    @__config _XT_OSC & _WDT_ON & _CP_OFF
    Dave
    Always wear safety glasses while programming.

  13. #13
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    Dear mackrackit is the correct code to do
    Thank you

    '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

    'pot 2,50,B1
    'B0 = B0 * 5
    'B1 = B1 * 5
    'y:
    'if B0 < 100 then yf
    'if B0 > 150 then yb

    'x:
    'if B1 < 100 then xr
    'if B1 > 150 then xl
    'serout 1,n9600,(5)
    'goto start

    'yf:
    'serout 1,n9600,(2)
    'goto start

    'yb:
    'serout 1,n9600,(1)
    'goto start

    'xl:
    'serout 1,n9600,(3)
    'goto start

    'xr:
    'serout 1,n9600,(4)
    'goto start

    'end

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


    Did you find this post helpful? Yes | No

    Default

    No, you still have not dealt with the variables.

    Take a look in the PBP manual about variables and symbols.
    Dave
    Always wear safety glasses while programming.

  15. #15
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    foto picbasic
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    Everything is commented out " ' "

    At least it will compile nothing
    Dave
    Always wear safety glasses while programming.

  17. #17
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    No, you still have not dealt with the variables.

    Take a look in the PBP manual about variables and symbols.
    Which is to say, you cannot store information in a variable which does not exist. In C you would declare the variable. In PBP you still must set it up first . . . Myvar var byte or MyVar var WORD in other words You Forgot to do this.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  18. #18
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Red face ruf-bot

    Dear mackrackit I'm taking stick.
    At picbasic I'm very difficult to understand I'm using the English translator. Could make new code. For me.
    I will be grateful.

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


    Did you find this post helpful? Yes | No

    Default

    I do not have time to write your code.
    But here is some old code you can look at to see how Pic Basic code is written.
    It basically is a test code for a POT.
    And read the threads I linked you to earlier.
    Code:
    '#####################
    '16F877A
    
    DEFINE OSC 20
    
    '####################
    'LCD SET UP
    DEFINE LCD_DREG     PORTB
    define LCD_DBIT     4
    DEFINE LCD_RSREG    PORTB
    DEFINE LCD_RSBIT    1
    DEFINE LCD_EREG     PORTB
    DEFINE LCD_EBIT     0
    DEFINE LCD_BITS     4
    DEFINE LCD_LINES    2
    DEFINE LCD_COMMANDUS    2000
    DEFINE LCD_DATAUS   50
    
    '#####################
    V1		VAR	BYTE
    LED	VAR	PORTD.2
    
    PAUSE 1000
    
    RUN:
    LCDOUT $FE,1,"POT"
    LCDOUT $FE,$C0,DEC V1
    PAUSE 100
    POT PORTC.7,127,V1
    IF V1 < 100 THEN
    GOTO LMP1
    ELSE 
    GOTO LMP2
    ENDIF
    GOTO RUN
    
    LMP1:
    HIGH LED
    GOTO RUN
    
    LMP2:
    LOW LED
    GOTO RUN
    
    END
    Dave
    Always wear safety glasses while programming.

  20. #20
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Unhappy ruf-bot

    Dear mackrackit I am very grateful for pacincia.
    more just one more dica.Porque that picbasic Compiler without error. generates the hex normal. more pic does not send the data for the receiver. thank you again ..

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


    Did you find this post helpful? Yes | No

    Default

    Sorry, I did not quite understand the last post.

    Are you saying that you got the Ruff Bot code to compile but it is not working?

    If so post your code that compiles and I will assume you have the hardware exactly as shown on the web page?
    Dave
    Always wear safety glasses while programming.

  22. #22
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default ruf-bot

    code asm:

    ; PicBasic Pro Compiler 2.46, (c) 1998, 2005 microEngineering Labs, Inc. All Rights Reserved.
    PM_USED EQU 1

    INCLUDE "16F84A.INC"

    RAM_START EQU 0000Ch
    RAM_END EQU 0004Fh
    RAM_BANKS EQU 00001h
    BANK0_START EQU 0000Ch
    BANK0_END EQU 0004Fh
    EEPROM_START EQU 02100h
    EEPROM_END EQU 0213Fh

    R0 EQU RAM_START + 000h
    R1 EQU RAM_START + 002h
    R2 EQU RAM_START + 004h
    R3 EQU RAM_START + 006h
    R4 EQU RAM_START + 008h
    R5 EQU RAM_START + 00Ah
    R6 EQU RAM_START + 00Ch
    R7 EQU RAM_START + 00Eh
    R8 EQU RAM_START + 010h
    FLAGS EQU RAM_START + 012h
    GOP EQU RAM_START + 013h
    RM1 EQU RAM_START + 014h
    RM2 EQU RAM_START + 015h
    RR1 EQU RAM_START + 016h
    RR2 EQU RAM_START + 017h
    _PORTL EQU PORTB
    _PORTH EQU PORTA
    _TRISL EQU TRISB
    _TRISH EQU TRISA
    INCLUDE "TX.MAC"
    INCLUDE "PBPPIC14.LIB"


    END
    :020000000128D5
    :02400E00FD3F74
    :00000001FF

  23. #23
    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.

  24. #24
    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   

  25. #25
    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.

  26. #26
    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

  27. #27
    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.

  28. #28
    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  

  29. #29
    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.

  30. #30
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Smile ruf-bot

    Dear mackrackit thank you for beautiful lessons bicbasic
    More and pacinencia my ficol very short time.
    I ask for my descupa falhas.Eu I was very interested in the project and much more tificio to me.
    You have a person I very helpful and very eficinte.
    A hug. (That God elumine their paths)

  31. #31
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Cesar35, I took some time to look at this code, truthfully I have not studied PBasic the $99 version, it appears it's syntax is a little different from PBasicPro, it spit it out patoey! Are you using the $99 version or are you using the Pro $250 version ? If using the Pro version the code below will compile. Will it run? Do not know. I compiled for 16F84A.
    Code:
    '****************************************************************
    '*  Name    : RufBot TX.BAS                                      *
    '*  Author  : [select VIEW...EDITOR OPTIONS]                    *
    '*  Notice  : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
    '*          : All Rights Reserved                               *
    '*  Date    : 11/16/08                                          *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '****************************************************************
    
    include "modedefs.bas"
    
    trisb = 134
     trisa = 133
     portb = 6
     porta = 5
    low 1
    input 0
    input 2
    B0 var byte
    B1 var byte
    start:
    pot 0,50,B0
    
    pot 2,50,B1
    B0 = B0 * 5
    B1 = B1 * 5
    y:
    if B0 < 100 then yf
    if B0 > 150 then yb
    
    x:
    if B1 < 100 then xr
    if B1 > 150 then xl
    serout 1,n9600,[5]
    goto start
    
    yf:
    serout 1,n9600,[2]
    goto start
    
    yb:
    serout 1,n9600,[1]
    goto start
    
    xl:
    serout 1,n9600,[3]
    goto start
    
    xr:
    serout 1,n9600,[4]
    goto start
    
    end
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  32. #32
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    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 " ' "?
    Hi Dave, the $99 pbasic has automatic variables B0 B1 W0, whereas the PRO version does not sec. 10.5, throwback to STAMPS.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hi Dave, the $99 pbasic has automatic variables B0 B1 W0, whereas the PRO version does not sec. 10.5, throwback to STAMPS.
    Well that is what I get for assuming things. I assumed the $99 version just lacked some features.

    Guess it is time for me to RTFM
    Dave
    Always wear safety glasses while programming.

  34. #34
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Smile ruf-bot

    Quote Originally Posted by Joe S. View Post
    Hi Dave, the $99 pbasic has automatic variables B0 B1 W0, whereas the PRO version does not sec. 10.5, throwback to STAMPS.

    Dear Joe S compile again not funciona.eu
    I'm using picbasic pro demo 250.
    And rx have to use B0 var byte
    Var B1 byte. thanks.

  35. #35


    Did you find this post helpful? Yes | No

    Default rufbot help

    hi
    bro i also tried to realise that rufbot and encountered the same problem
    please if you peopla can help me out with the code???????????

    thank u

  36. #36
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default rufbot

    '************************************************* ***************
    '* Name : RX.BAS *
    '* Author : [select VIEW...EDITOR OPTIONS] *
    '* Notice : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
    '* : All Rights Reserved *
    '* Date : 18/11/2008 *
    '* Version : 1.0 *
    '* Notes : *
    '* : *
    '************************************************* ***************
    include "modedefs.bas"

    DEFINE OSC 4

    @ DEVICE PIC16F84A 'iþlemci 16F628
    @ DEVICE PIC16F84A, WDT_On
    @ DEVICE PIC16F84A, PWRT_ON
    @ DEVICE PIC16F84A, PROTECT_OFF
    @ DEVICE PIC16F84A, XT_OSC

    PORTA=0
    TRISA=0
    PORTB=0
    TRISB=%00000010


    B0 var byte
    B1 var byte

    prestart: pause 400
    poke porta, 10 ' %00001010
    pause 200
    poke porta, 5 ' %00000101
    pause 200
    poke porta, 6 ' %00000110
    pause 200
    poke porta, 9 ' %00001001
    pause 200
    poke porta, 0 '
    pause 200

    start: serin PORTB.1,N9600,B0
    if B0 = 1 then forward
    if B0 = 2 then backward
    if B0 = 3 then left
    if B0 = 4 then right
    if B0 = 5 then nomove
    goto start

    forward: poke porta, 10
    goto start

    backward: poke porta, 5
    goto start

    right: poke porta, 6
    goto start

    left: poke porta, 9
    goto start

    nomove: poke porta, 0
    goto start
    end



    '************************************************* ***************
    '* Name : tx.BAS *
    '* Author : [select VIEW...EDITOR OPTIONS] *
    '* Notice : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
    '* : All Rights Reserved *
    '* Date : 18/11/2008 *
    '* Version : 1.0 *
    '* Notes : *
    '* : *
    '************************************************* ***************
    include "modedefs.bas"

    DEFINE OSC 4

    @ DEVICE PIC16F84A 'iþlemci 16F628
    @ DEVICE PIC16F84A, WDT_On
    @ DEVICE PIC16F84A, PWRT_ON
    @ DEVICE PIC16F84A, PROTECT_OFF
    @ DEVICE PIC16F84A, XT_OSC

    trisb = %10000110 '134
    trisa = %10000101 '133
    portb = 6
    porta = 5
    low 1
    input 0
    input 2
    B0 var byte
    B1 var byte

    start: pot PORTB.0,50,B0
    pot PORTB.2,50,B1
    B0 = B0 * 5
    B1 = B1 * 5

    y: if B0 < 100 then GOSUB yf
    if B0 > 150 then GOSUB yb

    x: if B1 < 100 then GOSUB xr
    if B1 > 150 then GOSUB xl

    serout PORTB.1,n9600,[5]
    goto start

    yf: serout PORTB.1,n9600,[2]
    return

    yb: serout PORTB.1,n9600,[1]
    return

    xl: serout PORTB.1,n9600,[3]
    return

    xr: serout PORTB.1,n9600,[4]
    return

    end

  37. #37
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    cesar35 wrote;
    I'm using picbasic pro demo 250
    How do you get the PBP demo to compile programs longer than 31 lines & use include files?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  38. #38
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Wink

    Caro Bruce ME envia um email.

  39. #39


    Did you find this post helpful? Yes | No

    Default help rufbot

    hi cesar first of all thanks a lot !!!!!!!!! brother

    now pls if u can provide me the stepper motor control program which i have to add with the main program

    then i can complete the code!!!!!!!!!!

    pls bro

    thank u

  40. #40


    Did you find this post helpful? Yes | No

    Default help guys!!!!!!!!

    hi !
    guys u have problem wit i c 434
    if any one can help me in understanding its working then i will be very thankful to u

Similar Threads

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