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

    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.

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

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

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

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

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

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

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