Code:
'****************************************************************
'* Name : CharliePlex *
'* Author : Jim *
'* Notice : Copyright (c) 2016 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 21/06/2016 *
'* Version : 1.0 *
'* Notes : For PIC 16F84A *
'****************************************************************
#CONFIG
__CONFIG _XT_OSC & _CP_OFF
#ENDCONFIG
'DEFINES:
define OSC 10
led var byte
tmp var byte
mainloop:
for led=0 to 19
lookup led,[12,12,9,9,3,3,7,7,10,10,5,5,11,11,6,6,13,13,14,14],tmp
TRISB = $f0|tmp
lookup led,[2,1,4,2,8,4,16,8,4,1,8,2,16,4,8,1,16,2,16,1],tmp
PORTB = tmp
pause 400
next
goto mainloop
16 would be PORTB.4(00010000) by my Bin/Dec table.
Bookmarks