Hi
I think this project is helpful to expand unlimited output by just three pins of any type of MCU
one application of this example is to control 7-segment with no refreshing and LEDs are high light and static view
In this project i used PIC12F675 to Expand outputs to 24 pins by Proton Compiler
Code:
Device = 12F675
Xtal = 4
Config no_mclre
All_Digital = On
TRISIO = 0
GPIO = 0
Symbol CP = GPIO.0
Symbol D = GPIO.1
Symbol LE = GPIO.2
Dim i As Byte
Dim o[3] As Byte
Clear
For i = 0 To 2 ' write 1 2 3 to the array
o[i] = i + 1
Next i
Main:
SHOut D,CP,1,[o[2]\8, o[1]\8, o[0]\8]
High LE : DelayUS 1 : Low LE
DelayMS 500
For i = 0 To 2 ' write the array
o[i] = o[i] + 1
Next i
GoTo Main
Schematic:
Hi, its great to see you visiting our forum. Why not try Proton Compiler for FREE?
Download the FREE version of Proton Compiler, Its called Amicus18 and its available from HERE
Already using proton Compiler??? Get rid of these pesky messages... get LICENSED USER STATUS
Download Proteus simulation


Reply With Quote
