sorry, mapping on page 58
alastair
That all looks VERY confusing ! The usual way to interlace 7 segment displays is to hook up all the "a" segments together, all the "b" segments to each other . . . and you use1 port per display unit to decide which display is illuminated. . . . I am beginning to see . . . you are using LCD on the demo board . . . pins scattered all over the micro controllers ports . . . look at this link:http://www.picbasic.co.uk/forum/showthread.php?t=3753
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.
Ooooooh how I wish !!!!!!
Anyway thanks for the link, for the moment its making my head hurt but ill work my way through that tomorrow, offhand unless there is a more direct route it maybe the way to go
thanks
Alastair![]()
Alistair
After close examination and some digging, I find the LCD on this board (datasheet attached) is a 1/4 multiplexed display. This is done to keep the number of pins to a minimum, but boy, is it going to be fun to program! This is intriguing to me, because that infers I can use a 16f913 with this display.
Now all I have to do is find a place to buy it!
Dave
from the link posted by joe s i did some digging around and i came accreoo this little gem from Ingvar
x var byte
i var byte
main:
for i = 0 to 3
' a b c d
' 0 6 4 2
LOOKUP i, [0,14,20,26], x
porta.0[x]=1
PAUSE 1000
porta.0[x]=0
PAUSE 300
next i
from this thread http://www.picbasic.co.uk/forum/showthread.php?t=4074
Which is using a look up table to (undocumented feature) offset address a port bit off a register. they are talking about relays but i'm going to have a go for lcddata register bit addressing
Thanks to all for your help
Alastair![]()
this works passing a bit pattern to individual bits as long as you know the bit offset from a register
in my case using register LCDDATA
' lcd setup
lcdcon = %11111111 'control register
lcdse0 = %11111111
lcdse1 = %11111111
lcdse2 = %11111111 'choose all pins for lcd use
lcdps = %00000000 'clock control, 0 is static
i var byte
x var byte
set var byte
main:
'display charactor '0' on 1st segment
for i= 0 to 6
lookup i, [22,23,71,94,70,46,47], x '1st 7-segments offsets
lookup i, [1,1,1,1,1,1,1,0],set 'set character '0'
LCDDATA0.0[x] = set 'display it
next i
pause 500 'some time to see it
'display charactor '4' on 1st segment
for i= 0 to 6
lookup i, [22,23,71,94,70,46,47],x '1st 7-segment
lookup i, [0,1,1,0,0,1,1],set 'set character '4'
LCDDATA0.0[x] = set 'display it
next i
pause 500 'some time to see it
goto main
-------------------------------------------------
With this my origional question answered, thanks to all
alastair
Bookmarks