not outputing 4-16 decoder

lake

New Member
hi i am using a 4-16 decoder 74hct154 and i am trying to output three differnt things of which two are lighting up fine but one isnt i was wondering if it was anything to do with my code

outputs:
let dirsc=%11111111
let pinsc=%00000000
let pins=b6
pause 2
***let pinsc=%11110000
let pins=b7****
pause 2
let pins=%00000000
let pinsc=b0
high b1
pause 2
let pins=%00000000
return


the code in the stars is not showing up on my dotmatrix

the portc is what controls the decoder and the pins is the rows of the matrix

the var b7 is a number e.g 28 which should light 3 lights 2,3,4

but this is not showing up

but if i connect the negative wire off the matrix which should go to the decoder it lights up but the others dim and its not right to do this ca anyone help me thanks
 

hippy

Technical Support
Staff member
You are going to have to explain your hardware in more detail because I cannot tell how your dot matrix LED's are connected. What's driving the anodes and what's driving the cathodes, and which pins drive the 74HCT154 ?

However, you should be able to solve this quite easily yourself and quicker than anyone else can, if you just change tack a little ...

When debugging a problem like this, put aside the program you are working with and start a new program just to test the hardware you have.

Set PINS=, PINSC= and DIRSC= so that one LED should be turned on. Check that it is and no others are. If not, check the voltage levels on all the control lines and you will find some which are not as they should be, or there is some other error.<code><pre><font size=2 face='Courier'> dirsc = %11111111
Do
pins = %00000001
pinsc = %00000000
Loop </font></pre></code> Repeat for every possible LED row and every possible LED column changing PINS and PINSC as appropriate ( 24 tests in total ).

Finally, write a program which will slowly step a single LED along each row and each column. When it all works, update the program you were working on.

If you try and fix hardware in the midst of another program or when things are changing too rapidly to be observable you stand little chance of finding what's going wrong.
 

lake

New Member
no it aws me one of the E0 or E1 pins on the decoder was not tied to zero so it was not displaying sorry thanks for your reply
 
Top