Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:22 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Picomite controlling LED matrix sign

     Page 2 of 3    
Author Message
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 03:09pm 17 Mar 2024
Copy link to clipboard 
Print this post

Ok I found an LS138, ran the three unused bits off the last 4094 into the inputs of the LS138.
The outputs from the LS138 then pull down the gates of the RFP Mosfets through some low value resistors.

Slight mods to the code and that is almost perfect, though there were some artifacts on the display bottom line.
Looking on the scope there is what look like very fast pulses coming out of the LS138 outputs, which I think is the data being clocked into the 4094's rippling through as I had enabled the LS138 permanently by connecting the enables to gnd and vcc..

So I have used a pin on the Pico which I connected to one of the enable inputs on the LS138, I shift the data out using SPi, then toggle the latch pin on the CD4094, finally I enable the LS138.
Flicker has now completely gone, so all good.

Code is now :-

Const collatch = MM.Info(pinno gp5)
Const LS138Enable = MM.Info(pinno gp1)              ' enable to the LS138

Dim integer RowDelay =  1            ' delay between writing rows
Dim integer i = 0
Dim integer j = 0
Dim integer x = 0
Dim integer temp = 0

' the leftmost LED is the leftmost byte bit 5  or $0AH
' the rightmost LED is the rightmost byte bit 1 or $02H
' the top 3 bits of the leftmost byte control the LS138 to provide drive to the FET;s

' 000XXXXX = Row1
' 001XXXXX = Row2
' 010XXXXX = Row3
' 011XXXXX = Row4
' 100XXXXX = Row5
' 101XXXXX = Row6
' 110XXXXX = Row7

' NOTE: the LSB f the first CD4094 isn't used, it is fed to the 'DRV' pin, so the righthand most column
' is actually 02 and not 01!!!!!


Dim integer Row1Data(7)= (&h10,00,00,00,00,00,00,02)
Dim integer Row2Data(7)= (&h30,00,00,00,00,00,00,02)
Dim integer Row3Data(7)= (&h50,00,00,00,00,00,00,02)
Dim integer Row4Data(7)= (&h70,00,00,00,00,00,00,02)
Dim integer Row5Data(7)= (&h90,00,00,00,00,00,00,02)
Dim integer Row6Data(7)= (&hB0,00,00,00,00,00,00,02)
Dim integer Row7Data(7)= (&hD0,00,00,00,00,00,00,02)

Pin(ColLatch ) = 0
Pin(LS138Enable) = 0


'      RX    TX   CLK
SETPIN GP16, GP3, GP2, SPI ' assign the I/O pins
SPI OPEN 5000000, 0, 8 ' speed is 5 MHz and the data size is 8 bits

start:
 ' Row 1
 Pin(LS138Enable) = 0
 SPI Write 8,Row1Data()
 Pin (collatch) = 1 : Pin (collatch) = 0    ' latch the data
 Pin(LS138Enable) = 1      ' enable the row  
 pause RowDelay

' Row 2
 Pin(LS138Enable) = 0
 SPI Write 8,Row2Data()
 Pin (collatch) = 1 : Pin (collatch) = 0    ' latch the data out
 Pin(LS138Enable) = 1      ' enable the row  
 pause RowDelay


' Row 3
 Pin(LS138Enable) = 0
 SPI Write 8,Row3Data()
 Pin (collatch) = 1 : Pin (collatch) = 0  ' latch the data out
 Pin(LS138Enable) = 1      ' enable the row
 pause RowDelay
 
' Row 4
 Pin(LS138Enable) = 0
 SPI Write 8,Row4Data()
 Pin (collatch) = 1 : Pin (collatch) = 0  ' latch the data out
 Pin(LS138Enable) = 1      ' enable the row  
 pause RowDelay
 
' Row 5
 Pin(LS138Enable) = 0
 SPI Write 8,Row5Data()
 Pin (collatch) = 1 : Pin (collatch) = 0  ' latch the data out
 Pin(LS138Enable) = 1      ' enable the row  
 pause RowDelay
 
' Row 6
 Pin(LS138Enable) = 0
 SPI Write 8,Row6Data()
 Pin (collatch) = 1 : Pin (collatch) = 0  ' latch the data out
 Pin(LS138Enable) = 1      ' enable the row  
 pause RowDelay
 
' Row 7
 Pin(LS138Enable) = 0
 SPI Write 8,Row7Data()
 Pin (collatch) = 1 : Pin (collatch) = 0  ' latch the data out
 Pin(LS138Enable) = 1      ' enable the row  
 pause RowDelay
 goto Start


The RowDelay was just so I could put a 2 second delay between each row so I could try and find the source of the flickering, it can go now.

Tony
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 04:42pm 17 Mar 2024
Copy link to clipboard 
Print this post

@Volhout,

Thank you for the example code, though I think it will need to be changed somewhat now I am driving the rows from the 74ALS138 after your suggestion, as the row pins on the Pico are now unused.

I'll take a look and try to understand how your code works, but if you could assist in modifying it that would be great.

Tony
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 06:11pm 17 Mar 2024
Copy link to clipboard 
Print this post

Hi tony,

In stead of shifting 12 characters of 5 bits, shift 13 characters of 5 bits. That is 65 bits, so you shift 1 bit to many, but it fits completely in the structure I created. The first character should not contain led pixel information, but the code for the row to be lit.

And that never changes, a fixed pattern for each row unique..

When you have a strobe pulse, short pulse, you do not need to control the enable of the ls138.

Volhout

P.s. the ls138 has one unused putput, when you address that output ypu immediately blank the display.
Edited 2024-03-18 04:13 by Volhout
PicomiteVGA PETSCII ROBOTS
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 05:25am 18 Mar 2024
Copy link to clipboard 
Print this post

@Volhout,

I've made those changes, but it isn't working i'm afraid, this is what I have now.


'4094  driver, running on picomite GEEK unit
option default integer
Const LS138Enable = MM.Info(pinno gp1)              ' enable to the LS138


'SPI channel
setpin gp16,gp3,gp2,spi    'gp2=clock, gp3=tx , gp16 is not used
'CD4094 shifts on rising clock edge, input data must change on falling edge.
SPI OPEN 200000,0,5       '200kHz data output falling edge, 8 bits

SetPin LS138Enable, DOUT
setpin gp5,dout           'latch enable signal
pin(gp5)=0                '0=hold data


'this is the array holding all the pixel data for the LED's
dim txt_out(12,6)
filltextarray

'this is the array that us used by SPI to send out data
dim row_out(12)

'this is the interrupt that multiplexes the display
settick 2,nextrow


'here comes the main code, text entry, scrolling, serial input etc...
do
  'do all the stuff
  pause 100 'just to simulate stuff...
loop



'This is the display multiplexer  
sub nextrow
Pin(LS138Enable) = 0
static i=0                            'static = local i inherits last value
inc i,1:if i=7 then i=0               'next row
math slice txt_out(), ,i ,row_out()   'copy into single dimensional array
spi write 13,row_out()                'send it out
pulse gp5,0.01                        'latch enable pulse
Pin(LS138Enable) = 1      ' enable the row  
'port(x,7)=row(i)                      'drive rows starting GPx, 7bit wide
end sub

'just to get the pixels in the DATA statements into an array
sub filltextarray
for i=0 to 6
  for j=0 to 12
    read txt_out(j,i)
  next
next
end sub


'some default text, each bit is a LED in 5x7

'row 1
 data &H01,01,00,00,00,00,00,00,00,00,00,00,00
'row 2
 data &H02,00,01,00,00,00,00,00,00,00,00,00,00
'row 3
 data &H04,00,00,01,00,00,00,00,00,00,00,00,00
'row 4
 data &H08,00,00,00,01,00,00,00,00,00,00,00,00
'row 5
 data &H10,00,00,00,00,01,00,00,00,00,00,00,00
'row 6
 data &H20,00,00,00,00,00,01,00,00,00,00,00,00
'row 7
 data &H40,00,00,00,00,00,00,01,00,00,00,00,00




I've added the first byte in the data table as the byte that selects the Row from the LS138, playing around with the bit's in the first byte, it isn't clear at the moment what is wrong, but these are screenshots from 'Logic' for the first 4 row data.

I've changed the data in the table too so I can see where the relevant bits are in the analyser display.

Row 1



Row 2



Row 3



Row 4



I can send you the captured data if you use Logic by Salae (which I think your screenshot was from).

Tony
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 06:14am 18 Mar 2024
Copy link to clipboard 
Print this post

I think it maybe something to do with the line

math slice txt_out(), ,i ,row_out()   'copy into single dimensional array

If I comment that line out and do it line at a time with a for next loop, then the data coming out is correct from what I can see on the analyser.

Tony
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 06:27am 18 Mar 2024
Copy link to clipboard 
Print this post

Hi Tony,

I will look at it later today, but still think the ls138 enable should not be used with this code.
Because the latching for all signals happens at the same time, there is no bleeding.

I will try to test the math slice dry. Maybe there is a bug when the array size is odd.
You can easily do the with a MATH V_PRINT row_out().

Later…

Volhout

Edit: Tony you should fill the first character with the ls138 input values: 1,2,3,4,5,5,7, not with 1,2,4,8,16,32,64,128
Edited 2024-03-18 16:31 by Volhout
PicomiteVGA PETSCII ROBOTS
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 07:05am 18 Mar 2024
Copy link to clipboard 
Print this post

Having looked a bit at the issue I have, the data I have in the first byte in the array is not correct,  need to change the values as I 'forgot' we are only using the lower 5 bits of the byte!!

Tony
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 07:09am 18 Mar 2024
Copy link to clipboard 
Print this post

Tony,

see above..

Edit: Tony you should fill the first character with the ls138 input values: 1,2,3,4,5,5,7, not with 1,2,4,8,16,32,64,128


Also: if you use the button above the post edit entry field called "code" and paste the text in between the CODE and /CODE markers, it is treated as code, not text.

 '4094  driver for 12 digit 5x7 led matrix display, running on picomite GEEK unit
 option default integer
   
 'SPI channel
 setpin gp4,gp3,gp2,spi    'gp2=clock, gp3=tx , gp4 is not used
 'CD4094 shifts on rising clock edge, input data must change on falling edge.
 SPI OPEN 500000,0,5       '500kHz data output falling edge, 5 bits
 
 setpin gp5,dout           'latch enable signal
 pin(gp5)=0                '0=hold data
 
 
 'this is the array holding all the pixel data for the LED's
 dim txt_out(12,6)
 filltextarray
 
 'this is the array that us used by SPI to send out data
 dim row_out(12)
 
 'this is the interrupt that multiplexes the display
 settick 2,nextrow
 
 
 'here comes the main code, text entry, scrolling, serial input etc...
 do
   'do all the stuff
   pause 100 'just to simulate stuff...
 loop
 
 
 
 'This is the display multiplexer
sub nextrow
 static i=0                            'static = local i inherits last value
 inc i,1:if i=7 then i=0               'next row
 math slice txt_out(), ,i ,row_out()   'copy into single dimensional array
 spi write 13,row_out()                'send it out
 pulse gp5,0.010                        'latch enable pulse
end sub


 
 'just to get the row number and pixels in the DATA statements into an array
sub filltextarray
 for i=0 to 6
   for j=0 to 12
     read txt_out(j,i)
   next
 next
end sub
 
 
 'some default text, each bit is a LED in 5x7
 'the first entry is the rown number, decoded by a 74ls138 driving P-FET's
 'the 2'nd....13'th entry in each row is pixel data for that row for characters 1..12
 'row 1
 data 1,01,00,00,00,00,00,00,00,00,00,00,00
 'row 2
 data 2,00,01,00,00,00,00,00,00,00,00,00,00
 'row 3
 data 3,00,00,01,00,00,00,00,00,00,00,00,00
 'row 4
 data 4,00,00,00,01,00,00,00,00,00,00,00,00
 'row 5
 data 5,00,00,00,00,01,00,00,00,00,00,00,00
 'row 6
 data 6,00,00,00,00,00,01,00,00,00,00,00,00
 'row 7
 data 7,00,00,00,00,00,00,01,00,00,00,00,00


Note, I changed GP16 back to GP4 since it would not work on my GEEK board.

Volhout
Edited 2024-03-18 17:36 by Volhout
PicomiteVGA PETSCII ROBOTS
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 07:39am 18 Mar 2024
Copy link to clipboard 
Print this post

Ok, sorted out the correct values for the first byte, this is what I now have

'row 1

 data &B00000,16,01,01,01,01,01,01,01,01,01,01,01
'row 2
 data &B00010,01,01,01,01,01,01,01,01,01,01,01,01
'row 3
 data &B00100,01,01,01,01,01,01,01,01,01,01,01,01
'row 4
 data &B00110,01,01,01,01,01,01,01,01,01,01,01,01
'row 5
 data &B01000,01,01,01,01,01,01,01,01,01,01,01,01
'row 6
 data &B01010,01,01,01,01,01,01,01,01,01,01,01,01
'row 7
 data &B01100,01,01,01,01,01,01,01,01,01,01,01,01


the only odd thing now is the left hand most column of LED's never lights, also, if I send out all the data bytes set to 01, I would have expected the righhtmost LED in each group of 5 to light, but they don't sending out

 data &B00000,01,01,01,01,01,01,01,01,01,01,01,01
'row 2
 data &B00010,01,01,01,01,01,01,01,01,01,01,01,01
'row 3
 data &B00100,01,01,01,01,01,01,01,01,01,01,01,01
'row 4
 data &B00110,01,01,01,01,01,01,01,01,01,01,01,01
'row 5
 data &B01000,01,01,01,01,01,01,01,01,01,01,01,01
'row 6
 data &B01010,01,01,01,01,01,01,01,01,01,01,01,01
'row 7
 data &B01100,01,01,01,01,01,01,01,01,01,01,01,01

I am seeing this





Could that be because we're sending 65 bits?

Tony
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 07:50am 18 Mar 2024
Copy link to clipboard 
Print this post

Try this:


data &B00000,16,16,16,16,16,16,16,16,16,16,16,16
data &B00010,08,08,08,08,08,08,08,08,08,08,08,08
data &B00100,04,04,04,04,04,04,04,04,04,04,04,04
data &B00110,02,02,02,02,02,02,02,02,02,02,02,02
data &B01000,31,31,31,31,31,31,31,31,31,31,31,31
data &B01010,04,04,04,04,04,04,04,04,04,04,04,04
data &B01100,16,16,16,16,16,16,16,16,16,16,16,16


Volhout
Edited 2024-03-18 17:51 by Volhout
PicomiteVGA PETSCII ROBOTS
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 07:51am 18 Mar 2024
Copy link to clipboard 
Print this post

Ignore the last email, I have just re-programmed it and it now is exactly as I expected, just the left most LED on each group of 5 LEDS' lit.

Now to figure out how to make digits, and get them into the array.

Really appreciate the help so far, I have learned a lot in the last 24 Hours!


Tony
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 07:54am 18 Mar 2024
Copy link to clipboard 
Print this post

Hi Tony,

You are welcome !! I love to see this project proceeding, and introducing people into this marvelous platform. What you have now is a solid basis for nice text banner.

As to the way you can form pixels for numbers: You can use labels, and add data statements. Like this:


'read the pixels for the character "1"
RESTORE one   'one is a label, from here you read the DATA
for i=1 to 7
 READ array(i)
next



one:
DATA 4,4,4,4,4,4,14   'pixel data for a 1
two:
DATA etc....


Keep us informed of your progress, people here on this forum love to stay informed...

Regards,

Volhout
Edited 2024-03-18 18:00 by Volhout
PicomiteVGA PETSCII ROBOTS
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 09:37am 18 Mar 2024
Copy link to clipboard 
Print this post

I just tried the data lines you sent, I get nothing recognisable on the display,




I think there still maybe something wrong in the shift / math bit.

If I set the data bytes to all 0 including  the first byte which selects the row, that should clock all zeroes to the display.

I've set a trigger pulse at the start of the code to trigger the analyser, then captured clock, data and 4094 latch.
For some reason I am seeing a '1' on the data line, but the data does'nt have any 1 bits set for the first row.



Top trace is clock, next one down is data and the next one down is the 4094 latch, the bottom one is the 1mS pulse to trigger the analyser.

This  is the code that produced that capture.



'4094  driver, running on picomite GEEK unit
option default integer
Const LS138Enable = MM.Info(pinno gp1)              ' enable to the LS138


'SPI channel
setpin gp16,gp3,gp2,spi    'gp2=clock, gp3=tx , gp16 is not used
'CD4094 shifts on rising clock edge, input data must change on falling edge.
SPI OPEN 200000,0,5       '200kHz data output falling edge, 5 bits

SetPin LS138Enable, DOUT
setpin GP15, DOUT          ' a trigger pulse for the analyser
setpin gp5,dout           'latch enable signal
pin(gp5)=0                '0=hold data
Pin(LS138Enable) = 1      ' enable the rows

'this is the array holding all the pixel data for the LED's
dim txt_out(12,6)
 'this is the array that us used by SPI to send out data
dim row_out(12)
filltextarray

'this is the interrupt that multiplexes the display
settick 2,nextrow

pulse GP15,1    ' a trigger pulse for the analyser

'here comes the main code, text entry, scrolling, serial input etc...
do
  'do all the stuff
  pause 100 'just to simulate stuff...
loop

'This is the display multiplexer  
sub nextrow
'Pin(LS138Enable) = 0
static i=0                         'static = local i inherits last value
inc i,1:if i=7 then i=0               'next row
math slice txt_out(), ,i ,row_out()   'copy into single dimensional array

spi write 13,row_out()                'send it out

pulse gp5,0.01                        'latch enable pulse
'Pin(LS138Enable) = 1      ' enable the row  
'port(x,7)=row(i)                      'drive rows starting GPx, 7bit wide
end sub

'just to get the pixels in the DATA statements into an array
sub filltextarray
for i=0 to 6
  for j=0 to 12
    read txt_out(j,i)
  next
next
end sub


'some default text, each bit is a LED in 5x7

data &B00000,00,00,00,00,00,00,00,00,00,00,00,00      
'row 2
data &B00010,00,00,00,00,00,00,00,00,00,00,00,00
'row 3
data &B00100,00,00,00,00,00,00,00,00,00,00,00,00
'row 4
data &B00110,00,00,00,00,00,00,00,00,00,00,00,00
'row 5
data &B01000,00,00,00,00,00,00,00,00,00,00,00,00
'row 6
data &B01010,00,00,00,00,00,00,00,00,00,00,00,00
'row 7
data &B01100,00,00,00,00,00,00,00,00,00,00,00,00



And the matrix looked like this



I took out the enable to the LS138, I am now seeing the artifacts on the bottom row you can see in the picture, if I have the lines back inf or the LS138 enable, the artifacts disappear.

Tony
Edited 2024-03-18 19:39 by 58kk90
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 09:54am 18 Mar 2024
Copy link to clipboard 
Print this post

No idea what is going on
using the math V-OUT you mentioned, right before the SPI instruction, I get


0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Which as far as I can tell is correct, so why I am seeing the '1' in the data out of the Pico is unknown.

Tony
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 10:05am 18 Mar 2024
Copy link to clipboard 
Print this post

So replacing the line

spi write 13,row_out()                'send it out

with

spi write 13,00,00,00,00,00,00,00,00,00,00,00,00,00               'send it out

gives this on the analyser




Which looks perfect, all 0's sent, all zero's being clocked out.

Tony
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 10:07am 18 Mar 2024
Copy link to clipboard 
Print this post

Hi Tony,

The "1" is in the first clock block, so it is the LS138 row address bit.
That should be correct.
I am not sure about the dim lit lowest row. MAybe that P-FET does not turn off fully. Is the LS138 output 5V, or only 4V. Maybe add a 1k pullup to the LS138 outputs. To make sure it is 5V and the FET is off.

The lit first row when sending 0's... I have no idea. I assume the data is shifted in from the left to the right ? So the lit column is the last bit sent ? Can you confirm ?

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 10:14am 18 Mar 2024
Copy link to clipboard 
Print this post

Hi Tony,

Looking at the 1'st picture in the 9:37 post, the data should shift 1 bit further.
I will check if the SPI setting is right for the 4094. Maybe mode=0 is not correct (although I thought it was).

Volhout
PicomiteVGA PETSCII ROBOTS
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 10:30am 18 Mar 2024
Copy link to clipboard 
Print this post

@Volhout,

This is the latest code,



'4094  driver, running on picomite GEEK unit
option default integer
Const LS138Enable = MM.Info(pinno gp1)              ' enable to the LS138

'SPI channel
setpin gp16,gp3,gp2,spi    'gp2=clock, gp3=tx , gp16 is not used
'CD4094 shifts on rising clock edge, input data must change on falling edge.
SPI OPEN 200000,0,5       '200kHz data output falling edge, 5 bits

SetPin LS138Enable, DOUT
setpin GP15, DOUT          ' a trigger pulse for the analyser
setpin gp5,dout           'latch enable signal
pin(gp5)=0                '0=hold data

'this is the array holding all the pixel data for the LED's
dim txt_out(12,6)
 'this is the array that us used by SPI to send out data
dim row_out(12)
filltextarray

'this is the interrupt that multiplexes the display
settick 2,nextrow

pulse GP15,0.1    ' a 100uS trigger pulse for the analyser

'here comes the main code, text entry, scrolling, serial input etc...
do
  'do all the stuff
  pause 100 'just to simulate stuff...
loop

'This is the display multiplexer  
sub nextrow
Pin(LS138Enable) = 0
static i=0                         'static = local i inherits last value
inc i,1:if i=7 then i=0               'next row
math slice txt_out(), ,i ,row_out()   'copy into single dimensional array
spi write 13,row_out()                'send it out
pulse gp5,0.01                        'latch enable pulse
Pin(LS138Enable) = 1      ' enable the row  
end sub

'just to get the pixels in the DATA statements into an array
sub filltextarray
for i=0 to 6
  for j=0 to 12
    read txt_out(j,i)
  next
next
end sub


'some default text, each bit is a LED in 5x7

data &B00000,00,00,00,00,00,00,00,00,00,00,00,02      
'row 2
data &B00010,00,00,00,00,00,00,00,00,00,00,00,04
'row 3
data &B00100,00,00,00,00,00,00,00,00,00,00,00,08
'row 4
data &B00110,00,00,00,00,00,00,00,00,00,00,00,16
'row 5
data &B01000,00,00,00,00,00,00,00,00,00,00,00,00
'row 6
data &B01010,00,00,00,00,00,00,00,00,00,00,00,00
'row 7
data &B01100,00,00,00,00,00,00,00,00,00,00,00,00




That is almost perfect, I get a backslash '\' on the rightmost 5 x 7 LED panel not sure why the previous versions were like they were, but clearing all the code and options from the Pico, and sending it again, it now ALMOST works.

By Almost, I have found an issue with the way the panel is wired, which may mean the code will need to be changed.

If I put 01 as the rightmost byte in the ROW 1 (or any row) data line, I see no LEDS lit.
If I change it to 02, then the right most LED lights up, looking at the pinout for the first CD4094, the D0 output doesn't go to the ULN driver like every other output pin does, it goes back to the header where the controller board would have fitted.

The right hand most column of the LED's actually goes to the D1 output via the ULN driver, which is why sending 02 lights the right hand most LED.
Sending 01, the pin on the header toggles high but no LED's light, which is understandable as the D0 output is effectively not used.

Tony
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 49
Posted: 10:38am 18 Mar 2024
Copy link to clipboard 
Print this post

Ok, so these data lines

' Row 1
data &B00000,00,00,00,00,00,00,00,00,00,00,00,02      
'row 2
data &B00010,00,00,00,00,00,00,00,00,00,00,00,04
'row 3
data &B00100,00,00,00,00,00,00,00,00,00,00,00,08
'row 4
data &B00110,00,00,00,00,00,00,00,00,00,00,00,16
'row 5
data &B01000,00,00,00,00,00,00,00,00,00,00,01,00
'row 6
data &B01010,00,00,00,00,00,00,00,00,00,00,02,00
'row 7
data &B01100,00,00,00,00,00,00,00,00,00,00,04,00

give me this




Which makes mapping the 'digits' to a 5 x 7 LED block a bit of a pain as it crosses byte boundaries.

Tony
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4229
Posted: 11:16am 18 Mar 2024
Copy link to clipboard 
Print this post

Hi Tony,

That is indeed a nasty problem. You can solve this in hardware if you want.
Use an OR gate (74LS32), combine CLK and LE, and use that to drive CLK. In essence you generate one extra clock pulse (the LE pulse).
But you will have to change the row selector in the first character (since that shifts 1 bit also). so 0,2,4,6,8,10,12 becomes 0,1,2,3,4,5,6

Volhout

P.S. the 4094 D0 going back to the pico can be usefull to check that the display is connected and working.... Since it is the last bit sent, when it is correct, all bits sent where correct. But that is something for another topic...
Edited 2024-03-18 21:19 by Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 2 of 3    
Print this page
© JAQ Software 2024