Serin Serout Help


Results 1 to 16 of 16

Threaded View

  1. #11
    Join Date
    Nov 2010
    Posts
    7


    Did you find this post helpful? Yes | No

    Lightbulb Update

    I have been working on the code for a couple of days. I have made a small progression if i manually send a "1" to the SERIN it will assume a flash rate of 1. this is done by placing the datapin wire to ground. Hear is the current code i am working with. Any help would be great, Thanks!
    Code:
    Recive:
    Clear 
    define ocs 4
    INCLUDE "modedefs.bas"
    @_config_HS_osc &_WDT_OFF &_LVP_OFF &_CP_OFF &_BODEN_OFF
    ADCON1 = %00000111
    CMCON = %00000111
    TRISA = %11111111
    TRISD = %00000000
    X VAR BYTE
    SERIN2 PORTA.5\PORTA.1, 3313, [DEC X]
    LOOP1:     
       HIGH PORTD.2
       PAUSE X
       LOW PORTD.2
       PAUSE X
    GOTO LOOP1
    END  
    
    Send:
    Clear 
    define ocs 4
    INCLUDE "modedefs.bas"
    @_config_HS_osc &_WDT_OFF &_LVP_OFF &_CP_OFF &_BODEN_OFF
    ADCON1 = %00000111
    CMCON = %00000111
    TRISA = %00000000
    TRISD = %00000000
    PORTA = %00000000
    LED VAR PORTA.1
    X VAR BYTE
    X = 100
    LOOP1: 
       SEROUT2 PORTA.5/PORTA.1, 3313, [100]
       PAUSE 5000
    GOTO LOOP1
    END
    Thanks again!
    Last edited by ScaleRobotics; - 12th December 2010 at 21:02. Reason: added code tags

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