18F1320 And I/0


Results 1 to 4 of 4

Thread: 18F1320 And I/0

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    You should have it good, but can you post your code?

    Anyways... the following work here on a EasyPIC 4 board
    Code:
    asm
        __CONFIG    _CONFIG1H, _XT_OSC_1H
        __CONFIG    _CONFIG2H, _WDT_OFF_2H 
        __CONFIG    _CONFIG4L, _LVP_OFF_4L
    endasm
    PORTA=0
    TRISA=0
    PORTB=0
    TRISB=0
    ADCON1=%01111111
    
    ByteA var byte
    
    Start:
        '
        '   LED show on PORTA
        '   -----------------
        for bytea=0 to 4
            PORTA = DCD BYTEA
            PAUSE 200
            NEXT
        
        TRISA=255    ' turn PORTA as input
    Spin:
        PORTB=PORTA  ' display PORTA push button status on PORTB
        GOTO Spin
    Last edited by mister_e; - 10th December 2006 at 19:50.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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