Quote:
'* Name : CharliePlexing *
'* Author : Jim Hagan *
'* Notice : Copyright (c) 2016 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 15/06/2016 *
'* Version : *
'* Notes : Twelve Leds 2 and 2 pattern *
'* : For 16F84A *
'************************************************* ***************
#CONFIG
__CONFIG _XT_OSC & _CP_OFF
#ENDCONFIG
'DEFINES:
define osc 10
'Initialize:
TRISA = %00000000 'Set PORTA to Output
PORTA = %00000000 'Set Ports Off
pause 1000
MAINLOOP
pause 1000
TRISA = %11110100 'Enable Pins A.0, A.1, A.3
PORTA = %00001001 'Turn on Pins A.0, A.3 (Led 2 and 9)
pause 1000
TRISA = %11110100 'Enable Pins A.0, A.1, A.3
PORTA = %00000011 'Turn on Pin A.0, A.1 (Leds 10 and 12)
pause 1000
TRISA = %11111000 'Enable Pins A.0, A.1 A.2
PORTA = %00000011 'Turn on Pins A.0, A.1 (Leds 4 and 8)
pause 1000
TRISA = %11110010 'Enable A.0, A.2, A.3
PORTA = %00001100 'Turn on A.2, A.3 (Leds 7 and 11)
pause 1000
TRISA = %11111111 'All Pins Disabled
goto MAINLOOP
end