View previous topic :: View next topic |
Author |
Message |
atoo
Joined: 31 Jan 2014 Posts: 32
|
multiplexing techniques with two 74HC595 |
Posted: Sun Mar 02, 2014 1:47 am |
|
|
someone could help me
still do not know how to send a byte
with two 74HC595 in a 8x8 matrix
74HC595 row and 74hc595 column |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sun Mar 02, 2014 6:26 am |
|
|
Controlling the 8by8 matrix LED can be broken down into simpler parts. A 'row' driver(595) and a 'column' driver(595). For any LED to be on the 'row' must be high( '1') and the column' must be low( '0').
Start with one 595 and connect 8 LEDs(and resistors) in common cathode configuration.
Using the CCS supplied example,cut code to turn on the LEDS in various patterns.
WHEN that works fine then
Use the other 595 and connect 8 LEDs(and resistors) in common ANODE configuration
Using the CCS supplied example,cut code to turn on the LEDS in various patterns.be SURE to EDIT the code as now what was 'on' is now 'off'.
It really helps to use graph paper to 'see' the bit patterns and logic necessary to control the LEDs.
The 'trick' or 'key' is to start small,build upon knwoledge you gain by observing what works(and doesn't).As for the 'bit' patterns to make characters, again graph paper is very,very helpful is determining the 'mask'(actual data to 595) needed to display whatever you want.
For resistors, I'd use 8 - 100r in series with the anodes(rows) AND 8 - 100r in series with the cathodes(columns).This ensures there's always a current limit though 8 - 200r in either row or col would work as well.
hth
jay
You can simply the project if your PIC has 2 8 bit ports available. This eliminates the 595s. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Sun Mar 02, 2014 9:24 am |
|
|
Giv us some idea of:-
1) Your schematic.
2) Your code.
Is your circuit something like this?
Code: |
----------------------------
| |
| PIC16F84 |
| RB0 RB1 RB2 |
----------------------------
| | |
| | |
| | | ------- -----------------
| | --|DATA Q7|---WWW---| o o o o o o o o |
| | 0V--|OE Q6|---WWW---| o o o o o o o o |
| | 5V--|MR Q5|---WWW---| o o o o o o o o |
| | | Q4|---WWW---| o o o o o o o o |
|----------|CK Q3|---WWW---| o o o o o o o o |
| | | Q2|---WWW---| o o o o o o o o |
| |------|EN Q1|---WWW---| o o o o o o o o |
| | --|Q7S Q0|---WWW---| o o o o o o o o |
| | | ------- -----------------
| | | '595 | | | | | | | |
| | | | | | | | | | |
| | | ------- | | | | | | | |
| | --|DATA Q7|----------- | | | | | | |
| | 0V--|OE Q6|------------- | | | | | |
| | 5V--|MR Q5|--------------- | | | | |
| | | Q4|----------------- | | | |
----------|CK Q3|-------------------- | | |
| | Q2|--------------------- | |
------|EN Q1|----------------------- |
| Q0|-------------------------
-------
'595 |
If it is then do as Mt T suggests.
a) Work with 1st '595 only.
b) Use CCS provided code for one off '595.
c) Get system to work by connecting one only matrix column to supply rail.
(Which rail depends on whether you've got CA or CC columns.)
Mike |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
Atoo |
Posted: Sun Mar 02, 2014 9:51 am |
|
|
I would make some code to delete the byte using output toggling. Can Be?
Or any other technique an array of bitwise be cool?
Or rather, would only be possible with some simple matrix and FOR loops?
Suggest what kind of suggestion ?
something without bookstore 74HC595
independente
Atoo
Charles PB |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Sun Mar 02, 2014 10:40 am |
|
|
It depends totally on how your code needs to be designed.
One approach would be to have a timer tick, and then have this on every 'tick' output the next pattern on the column, and every eight ticks change rows, doing nothing else.
Your main code can then just specify what needs to be output, and the tick will keep on doing this at the designed rate, so ensuring the display keeps operating whatever else is going on.
The key point is that you need to get the control of the chips working _first_, and then work out the timings you need, and work out how to provide these.
Best Wishes |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
Re: Atoo |
Posted: Sun Mar 02, 2014 11:05 am |
|
|
atoo wrote: | I would make some code to delete the byte using output toggling. Can Be?
Or any other technique an array of bitwise be cool?
Or rather, would only be possible with some simple matrix and FOR loops?
Suggest what kind of suggestion ?
something without bookstore 74HC595
independente
Atoo
Charles PB | You're trying to run before you can walk.
There are now three of us saying the same thing.
Start simple. Get things to works, in small steps, one at a time.
If you are really stuck, show us a schematic and your code, then we'll help.
Mike
PS What does this mean? "bookstore 74HC595" |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Sun Mar 02, 2014 11:57 am |
|
|
in the era of ubiquitous, and cheap LCD character displays -
is there a reason you must use multiplexed LEDS?
in my case it only took ONE experience with using a mux'd display in
a small ( supposed to be ) very high audio quality FM transmitter exciter design, to learn my lesson. the mux switching process was costing almost
6 db of nasty noise floor trash in the recovered audio, unless a lot of extra $$ were to be dumped into extra power supply cleaning.
An LCD with blue-led backlit display made the design cheaper, and very well accepted by the customer to boot.
do you HAVE to have an LED matrix ?? |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
ATOO impossivel não é mais é dificil !! |
Posted: Mon Mar 03, 2014 5:18 am |
|
|
Code: |
//MELHORANDO CODIGO
//SEGUINDO CORRETAMENTE
// CHARLES FRANCES
//joão pessoa pb
queria fazer um quadrado mais não estou conseguindo
wanted to make a square with two 74HC595 row and column
this is my code and was unable to form a square !!!
and thus mastering two hc595
const unsigned char Code[]=
That is my mistake keeps repeating and disrupts
send the byte
My error is the while(true)?
{
0x00,0x08, // X=8
0x00,0x08, // Y=8
0xFF, // ########
0x81, // #......#
0x81, // #......#
0x81, // #......#
0x81, // #......#
0x81, // #......#
0x81, // #......#
0xFF // ########
};
|
Last edited by atoo on Mon Mar 03, 2014 9:59 am; edited 2 times in total |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Mon Mar 03, 2014 6:16 am |
|
|
Please, use the CCS supplied '595 driver code that's in the 'examples' folder.You'll get better support and your project working faster if you do.
The code you show is too 'messy' to follow but I 'think' it's trying to control the 595 using the matrix data.I'm NOT about to waste any more time on it, the CCS example code does work!
Also you do not tell us the pin assignments ,that's very very important and should be in the first 10-15 lines of code.
hth
jay |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
|
Posted: Mon Mar 03, 2014 6:49 am |
|
|
this right
eu entendo
I'll try |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Mon Mar 03, 2014 11:25 am |
|
|
You're making it difficult to help you.
You've editted a post after getting a response, that makes it impossible to follow the thread.
Please:-
1) Show us your circuit. We need to know which way round your display is connected.
2) As suggested, use the CCS example to start with. The CCS code is known to work, will prove your circuit operates, and you will get a feel for how to drive the display.
3) Keep your code simple and show us complete compilable code when you get stuck.
Mike |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
Atoo |
Posted: Thu Mar 06, 2014 12:50 pm |
|
|
Mike Walne
Thank you for listening
Has Helped me a lot from start to finish
I managed to complete without the used library conssegui six-pin
I discovered there are many possibilities to do this
problem solved! looks like the design of the array you posted!
Thank resolved
with the drawing above you complete with loops |
|
|
|