PDA

View Full Version : Scrolling Display help



Frozen001
- 12th September 2008, 19:23
I am working on an applaction that has a test mode that I want to scroll a character test across 3 HDSP-2112 displays. I am using a PIC18F8722 micro, and I have a sample working the way I want it to, but I am wondering if there is a better way to do it.

Here is the section of code

CharTest:
For Cnt1 = 0 to 7
Char[CNT1]=" "
NEXT


While PortF.4=1

For CNT1 = FirstChar TO LastChar
Lookup CNT1,[" ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890'!@#$%^&*()/? ~"], Char1
Char[Alpha] = Char1
Alpha=Alpha+1
next
Alpha=0
FirstChar=FirstChar+1
LastChar=LastChar+1
If Char[23] = EOM THEN
Char[23]=" "
FirstChar=0
LastChar=23
ENDIF


For CNT2 = 1 to 3
For CNT1= 24 to 31
IF Alpha <=7 then DispAdd=$06
IF (Alpha > 7) and (Alpha <= 15) then DispAdd=$05
If (Alpha > 15) Then DispAdd=$03
DigAdd=CNT1
DigData=Char[Alpha]
Gosub DisplayWrite

Alpha=Alpha+1
next
Next
Alpha=0
Pause 150
wend
FirstChar=0
LastChar=23
Char1=" "
Return

mackrackit
- 12th September 2008, 19:46
This may help
http://www.picbasic.co.uk/forum/showthread.php?t=5326&highlight=scrolling

Archangel
- 12th September 2008, 20:15
Bruce has an example using those on his website: http://www.rentron.com/PicBasic/Moving_Message_Display.htm