Is this possible?


Results 1 to 21 of 21

Threaded View

  1. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Of course it's possible.
    You're using PicBasic Pro.

    Code:
    Pattern   VAR WORD
    Idx       VAR BYTE
    ;---------------------------------------------------------------------------
    INCLUDE "VirtualPort.bas";
    ASM  
    MyPortPins  macro               ; these define which bits go with which pins
    Vpin   0, PORTC,5
    Vpin   1, PORTC,0
    Vpin   2, PORTC,4
    Vpin   3, PORTC,1
    Vpin   4, PORTC,3
    Vpin   5, PORTC,2
    Vpin   6, PORTC,6
    Vpin   7, PORTB,4
    Vpin   8, PORTC,7
    Vpin   9, PORTB,6
    endm
    ENDASM
    ;---------------------------------------------------------------------------
    Init:
    @   OutputPort  MyPortPins             ; Set Pins to Output
     
    Main:
        FOR Idx = 0 to 38 STEP 2
    READ Idx, WORD Pattern             ; get pattern from EEPROM
    @       WritePort  _Pattern, MyPortPins    ; write pattern to Virtual Port
    PAUSE 100
    NEXT Idx
    GOTO Main
    Attached Files Attached Files
    Last edited by ScaleRobotics; - 1st September 2011 at 23:56. Reason: Removed B2 pin, wasn't specified originally
    DT

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