Problem with 28X1 bidirectional pins

vertigo

Member
Hello, I am working with a led matrix board (24x16 leds) that I want to use with a 28X1 (firmware A.2).
The datasheet can be found on my web page (cick on Introduction).
It works very well for sending data to the matrix, but I am unable to have the 28X1 read the matrix (The board allows the user to ask the matrix if a led is ON or OFF).
There are 4 wires between the Picaxe and the matrix :
- one WRITE clock (out)
- one READ clock (out)
- one Chip Select (out)
- one for DATA (should be bidirectional)

If I use one of pins 21 to 28 (= out 0 to out 7) for the DATA line, I have no problem writing to the matrix.
When I use pin 15 (in 4 / out 4) for the DATA line, with dirsc to set it as Output or Input, it doesn't work (= the matrix doesn't display anything), even when set to Output.

symbol ToMatrix = %00010000 'pin 15 = OUTput
symbol FmMatrix = %00000000 'pin 15 = INput


To write to the board, I use the spiout command, for example:
spiout WRITE, DATA, 0, (0/4)

If DATA is on pins 21 to 28, it is OK (check the small video on my page, above). If I change DATA to pin 15, and set dirsc to %00010000, the display stays OFF.

Any idea ?
Thank you,

Christophe
 

Technical

Technical Support
Staff member
Most 'output' style commands, including pulsout, serout, spiout, etc. etc. only work on the normal output pins. You cannot use portc pins within the command. portc outputs are only simple on/off outputs.
 

Mycroft2152

Senior Member
Congratulations. Good looking website!

That is a lot of work, publishing it in both French and English.

Myc
 
Last edited:

vertigo

Member
Thank you, Myc ! ;-)
Technical, I was afraid of your answer.
Does anyone know if it could be possible (and how) to connect the single DATA line to 2 picaxe pins (one true input and one true output) at the same time ?
According to the datasheet, in WRITE mode, the DATA line must be set to output to send the address (in read and write mode) and to send the data (= LED status).
In READ mode, the DATA line must be set to output, again to send the address, and then set to input to read the LED status at this address.
Could it be as simple as joining one input pin and one output pin on the picaxe side, and then both pins to the matrix DATA line ?
I don't want to see my 28X1 smoking, so I won't try except if you, experts, confirm that I can do it without any risk.

One last question: according to Technical reply, how do you connect and use a DS18B20 (temperature sensor) to a 28X1 ?

Thank you,

Christophe
 
Last edited:

Technical

Technical Support
Staff member
You must connect a 1k resistor between PICAXE output and the matrix data pin. The data matrix can connect straight to the PICAXE input pin.

readtemp command, for DS18B20, works on any input pin 0-7. Circuit is under 'readtemp' in part 2 of the manual.
 

vertigo

Member
Thank you Technical :

28x1_matrix_rw.jpg

It works as expected.
Now, I just have to find an application for this matrix display... ;-)

Christophe
 
Top