I suggest you try this: Link deleted... Constructive criticism please..
Last edited by a moderator:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'code could be as simple as this '
Dim columns as portB
Dim rows as portC
while true
columns = %1000000
rows = %01111111
' delayms just a little here
columns = %1000000 'change these to make line letter add more
rows = %01111111
' delayms just a little here
columns = %1000000
rows = %01111111
' delayms just a little here
columns = %1000000
rows = %01111111
' delayms just a little here
columns = %1000000
rows = %01111111
' delayms just a little here
columns = %1000000
rows = %01111111
' delayms just a little here
columns = %1000000
rows = %01111111'
'delayms just a little here
columns = %0100000
rows = %10111111
'Keep going till it goes across the leds then change to a
'letter
wend
wend
....and maybe I am wrong??....
PortC = 0
While 1= 1
PortB = 7 'First column
PortC = 128
DelayMS(5)
PortC =0
PortB = 60 'Second column
PortC = 64
DelayMS(5)
PortC = 0
PortB = 196 'Third column
PortC = 32
DelayMS(5)
PortC =0
PortB = 60 'Fourth column
PortC = 16
DelayMS(5)
PortC = 0
PortB = 7 'Fifth column
PortC = 8
DelayMS(5)
PortC =0
PortB = 0 'Sixth column
PortC = 4
DelayMS(5)
PortC = 0
PortB = 0 'Seventh column
PortC = 2
DelayMS(5)
PortC =0
PortB = 0 'Eight column
PortC = 1
DelayMS(5)
PortC = 0
Wend
{
*****************************************************************************
* Name : Matrix Test.BAS *
* Author : Jon Chandler *
* Notice : Copyright (c) 2014 Creative Commons 3.0 sa-by-nc *
* : All Rights Reserved *
* Date : 3/12/2014 *
* Version : 1.0 *
* Notes : A quick test to verify connections and operation of an 8x8 *
* : LED matrix diplay. Rows are connected to PortB with series *
* : resistors, colums to Port C witn a ULN2803 or similar driver *
*****************************************************************************
}
'matrix tests
Device = 18f25k20
Clock = 20
Dim Column As Integer
Dim row As Integer
Dim i As Integer
Dim j As Integer
Dim speed As Integer
TRISB = %00000000
TRISC = %00000000
PORTB = 0
PORTC = 0
speed = 50
While 1 = 1
Column = 1
row = 1
For i = 0 To 7
PORTB = row
For j = 0 To 7
PORTC = Column
Column = Column << 1
DelayMS(speed)
Next
row = row << 1
PORTB = row
Column = 1
Next
Wend
'matrix tests - Letter J
Device = 18f25k20
Clock = 20
Dim Column As Integer
Dim row As Integer
Dim i As Integer
Dim j As Integer
Dim speed As Integer
TRISB = %00000000
TRISC = %00000000
PORTB = 0
PORTC = 0
speed = 1
While 1 = 1
PORTB = 134
Column = %10000000
PORTC = Column
DelayMS(speed)
PORTB = 129
Column = Column >> 1
PORTC = Column
DelayMS(speed)
PORTB = 129
Column = Column >> 1
PORTC = Column
DelayMS(speed)
PORTB = 129
Column = Column >> 1
PORTC = Column
DelayMS(speed)
PORTB = 254
Column = Column >> 1
PORTC = Column
DelayMS(speed)
PORTB = 128
Column = Column >> 1
PORTC = Column
DelayMS(speed)
PORTB = 128
Column = Column >> 1
PORTC = Column
DelayMS(speed)
PORTB = 0
Column = Column >> 1
PORTC = Column
DelayMS(speed)
Wend