Hi.is posible to conect anod led to pin1(porta) and cathod led to pin2 (porta) ?
I need led matrix component,please help!
Tnx,Best Regards,Teo
led matrix
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: led matrix
Hello
Yes that is possible, maybe use a small 220 Ohm Resistor in series with the LED too to limit the current consumed.
However if you are not doing this for a special function then you may as well simply connect the cathode of the LED to ground and then toggle the LED by switching the I/O pin on and off.
Yes that is possible, maybe use a small 220 Ohm Resistor in series with the LED too to limit the current consumed.
However if you are not doing this for a special function then you may as well simply connect the cathode of the LED to ground and then toggle the LED by switching the I/O pin on and off.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 209
- Joined: Thu Oct 19, 2006 11:46 am
- Location: Bakewell, UK
- Has thanked: 20 times
- Been thanked: 16 times
Re: led matrix
The PIC Kit 1 is a good example of an LED array of 16 LED's from just 4 port pins. However, when transposing the wiring to a stand alone application it soon became clear that the elegant solution was just too complicated and some LED's 'leaked' enough current to give dim lighting on LED's that should not have been lit. It was easier to use a bigger chip in the end.
If you still want to do it then a look up table (Flowcode 4 On Case command is promised) will be what I think you need.
Regards,
Mark
If you still want to do it then a look up table (Flowcode 4 On Case command is promised) will be what I think you need.
Regards,
Mark
Go with the Flow.
Re: led matrix
HI, sorry for my bad english.I need to simulate 5x7 led matrix using flowcode.The diode(x) from the led matrix is conected for example between porta1 and portb1.Using 12 pins (porta1,2,3,4,5, and portb1,2,3,4,5,6,7) is posible to display all alphanumerical characters.Please help me!
Best regards,
Teo
Best regards,
Teo
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: led matrix
Hello Teo
First I would try to do a single character and then take it from there. To do this you will need to create an array of 5 bytes. At the start of your program initialise these bytes with the binary to display your character. Then send byte 0 in the array to portb and switch on all of porta except RA0. This will allow for column 0 of the LEDs to light up. Wait approx 4-5ms and then repeat this time for byte 1 of the array on portb and porta all on except for RA1. do this for the remaining 3 bytes in the array and then repeat the loop of 5 to maintain the flicker free display. Changing the values in the array will allow you to update your display with a new character. You could even set up a timer interrupt to step through each of the array bytes and output the values to the ports so you can update the display values in your program and they will automatically refresh on the display.
First I would try to do a single character and then take it from there. To do this you will need to create an array of 5 bytes. At the start of your program initialise these bytes with the binary to display your character. Then send byte 0 in the array to portb and switch on all of porta except RA0. This will allow for column 0 of the LEDs to light up. Wait approx 4-5ms and then repeat this time for byte 1 of the array on portb and porta all on except for RA1. do this for the remaining 3 bytes in the array and then repeat the loop of 5 to maintain the flicker free display. Changing the values in the array will allow you to update your display with a new character. You could even set up a timer interrupt to step through each of the array bytes and output the values to the ports so you can update the display values in your program and they will automatically refresh on the display.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel