
Originally Posted by
bmagistro
Hello,
I'm hoping someone can point me in the right direction, I want to create an array of pins something like what is shown below, but I haven't found a way yet. Thanks in advance guys.
Code:
myvar[0] = portb.2
myvar[1] = portc.1
myvar[2] = portc.5
Hi bgmagistro,
I would submit, that you have !
Code:
MyPort var byte 'your new ports name
myport.0 = portB.0 'seg. A
Myport.1 = PortA.0 'seg. B
Myport.2 = PortB.1 'seg. C
Myport.3 = PortB.2 'seg. D
MyPort.4 = PortA.1 'seg. E
Myport.5 = PortA.2 'seg. F
MyPort.6 = PortB.3 'seg. G
MyPort.7 = PortB.4 'dec point
num var byte 'where your display pattern gets put
index var byte 'where your number originates
lookup2 index,[%11111000, %01100000,%11011010],myport ' just 0,1,2 in this short table
'myport = num 'display pattern loads into ports for display
'you may eliminate the last statement, put myport instead of num
main: 'do something here
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks