reverse polarity to a Max 7219
youngbill
Posts: 54
Does anyone know if reverse polarity will damage a max 7219?
Any suggestions on how to test it?
Is there a replacement for the 7219? Last time was 4 years ago when i built my project, the 7219 was going out of production then i believe.
My hookup is the same as on page 136 of programming and customizing the basic stamp by scott edwards,, Debug seems to show the code is counting,yet no segments light. Any one have a extremely simple code,,just for testing the max.
Any suggestions on how to test it?
Is there a replacement for the 7219? Last time was 4 years ago when i built my project, the 7219 was going out of production then i believe.
My hookup is the same as on page 136 of programming and customizing the basic stamp by scott edwards,, Debug seems to show the code is counting,yet no segments light. Any one have a extremely simple code,,just for testing the max.
Comments
Maxim's website says that it's still in production.
Please do not post duplicate messages. That's against forum rules.
Where do I modify the code to make it go into test mode ,,,( ie light all digits ) I tried changing init,,
,FOR index = 1 TO 8
LOOKUP index, [Scan, 7, Brite, 14, Decode, $FF, ShutDn, 1], d7219
in the lookup index,,the last address,and data shutDn,from 1 to zero,,,and i tryed to add test,1 but nothing lights the segments.
and any suggestions on how and where to use DEBUG to find the problem.
Many thanks,,,to chris,,and metron9 who helped me in 2006 on the origional design.
jonw
and let you know what happens
Instead of FOR index = 1 TO 8 it should read FOR index = 0 TO 7
The one for initialization needs 0 to 7 , and the index for digits needs to start at one.
I do not understand two things about initialization,
#1 we declare index to be a byte ( size ) as such as maximum 255,How can lookup index hold 8 pairs (address,and data to init the max) I assume its reserved more space than 256,,oh,,i think I see it now,,,,256 different address's but with the value in the address being as much as 65535,,( where does this 65535 number come from?)
And #2,,,I am still confused on initializing the max 7219,,,,we have index 0 to 7,,,,,,to send a series of reg addresses paired with their desired values.
ie,,,,scan =3
bright =10
decode =%1111
shutdn - 1
thats four address and 4 values,,,,,ahh maybe thats why I can not get the max to go into test mode,,,,I may need set index 0 to 9,,,and add TEST 1
Will try this,
My posted code does not work,,( I lost my origional working code )..but I would like to learn how to use debug to learn how to trouble shoot my code.
The data are one byte each. The routine is reading pairs of data only in the sense that the first byte is the command and the next is the data. But it is still a single byte being read one at a time, therefore only 8-bits max per read and sent to the MAX7219.
I do not have a MAX7219 chip right now to test this code
Please let me know what this dose when you try it
Look at this Table in the Data Sheet you will see that you have send all the data in one line
I could wrong about this how ever I wrote some code for a Max1497 ADC 3.5 Digit Meter Chip
and had to learn how to read and write to this chip be able get the data out of this chip
SHIFTOUT DataIn, Clock, MSBFIRST, [%0000111111111111]
You may have to put this in a DO LOOP
' REGISTER D15–D12 D11 D10 D9 D8 HEX CODE
'
' Decode Mode X 1 0 0 1 xX9
' Display Test X 1 1 1 1 0xXF
'
'
' Shutdown Register Format (Address (Hex)
'
' MODE D7 D6 D5 D4 D3 D2 D1 D0 Address CODE(HEX)
'
'Shutdown X X X X X X X 0 0xXC
'Normal Operation X X X X X X X 1
'
' {$STAMP BS2}
' {$PBASIC 2.5}
CS PIN 0
Clock PIN 1
DataIn PIN 2
start:
LOW CS
SHIFTOUT DataIn, Clock, MSBFIRST, [%0000111111111111]
high cs
END
found called AppKit from the parallax site.
I tried it ,but nothing,then i must have found,a short on the display board,,because I reset test mode to $0f01 and i had 6 digits lit..( I don't know why 6 digits...i have wired it according to scott edwards book ,,programming the stamp.
BUT,,,when i changed back to normal mode $0f00,,,I have nothing lit again.
Yet i see its counting in debug.
One thing i find funny about this code,,is the end of the subroutine,,,shiftout msb first,,,then alot of code id executed,,,flags and z...and then they shiftout the data,,,,,,will that work,,,,or will data be lost.
So now wat,,,any suggestions
The paper says,,this is a 5 digit display,,,up to 65535,,,yet my debug is only going to 9 then looping?
http://www.parallax.com/SearchResults/tabid/37/Default.aspx?Search=MAX7219
(Parallax home page > Search > Site > MAX 7219)
Jim
I added For index 0 to 9,,,so I could use all segments ON test mode, It is a computer generated clock,,,ie not a real time clock,,,but what I want to do is follow the max app notes (# 1196 ,,,using the max to drive higher voltage or current),,, and drive a larger display,,here is a working code,,Thanks for your reply
I want to do this with a DS1302 time chip and Maybe a MAX186
Chris Savage
At one point I posted a small segment of code that just activates the test mode on the MAX7219...now where in this plethora of messages could that be?
Chris see if you can find that code that you wrote a small segment of code that just activates the test mode on the MAX7219
Thanks for any thing that you can post
Most of the code you see posted says index 0 to 7....and that gives max enough info to be usable, I found that making the index 0 to 9,,,I can include the test mode
By sending $0F01 ( $0F00 to restore normal operation )to address 15 or address 0x0C,,,see the data sheet
or in other words you need to sst the LSB of register 0x0C to 1 for test
Decode CON $09 ' BCD Decode Register
Brite CON $0A ' Intensity Register
Scan CON $0B ' Scan Limit Register
ShutDn CON $0C ' Shutdown Register (1 = On)
Test CON $0F ' Display Test Mode
Blank CON %1111 ' Blank A Digit
No CON 0
-[ Initialization ]
Init:
FOR index = 0 TO 9
LOOKUP index, [Scan, 7, Brite, 14, Decode, $FF,shutdn,1, test,$0f00 ], d7219
In your example (which is similar to what is in the Digital Alarm Clock code) for test mode, you do not need to send $0F00. The $0F is all that is sent and the $00 is not accessed but does use an extra byte of EEPROM.
Since the least significant bit is all that needs to be sent, you can also just send a one (1). See code from Digital Alarm Clock project below. This example turns on all segments for two seconds prior to the display init routine shown. the significance of this is that the TEST mode works before the SHUTDOWN mode has been disabled and the brightness setting has been set.
My load is 30 Ma @12v....segment led.
Q1 is a pn2222
Q2 is IRF 9540 P mosfet
Q3 is a pn2222
the problem is my led display is not full on,( its Dim)
I have a multimeter and 2 channel scope for testing.
Q1 seems to be saturated,,with 1.2volts across V c-e
BUT Q3 has 5.2 volts across it,,,so it is possibly not on enough to turn on the mosfet.( I believe this is where the problem is,,,how do I check a mosfet is on )
Now the questions
How can I read segment current with my test equipment,( either segment current or digit current) AT this higher frequency? Would it help to put the max 7219 into test mode ( I think it will still be scanning and mutiplexing )...would it be better to use a muti meter set for AC? with hi freq.
Also with regard to the segment circuit,,,,I believe the common base transistor circuit is used (Q3) because of the higher frequency,,,,BUT will the mosfet not work directly from the max?,,,OR can anyone show me how to check if this mosfet is possibly the wrong choice IRF9540.
FROM THE APP NOTES,,,,,SEE ATTACHMENT,,,,MY V CASCODE IS 5 VOLT
V DRIVER IS 12V
The circuit of Figure 2 includes a level shifter to allow a higher supply voltage than 5V to be used to drive the
LEDs. Q3 operates as a common-base current switch, and sinks a collector current set by resistor R2 (about 5mA
using Vcascode = 5V) when the digit drive output is low. This current in turn develops about 5V across the 1kW of
R3 to provide a consistent gate drive to logic level PFET Q2, independent of the fluctuations of the supply Vdriver.
Note, though, that the collector of Q3 can go no lower than VCE(sat)Q3 above it's emitter, which is at VBE below
Vcascode.
Figure 2. Current boosting the digit drive using an LED supply 10V or higher.
As R3 is dropping 5V, this places the lower limit for the supply Vdriver at about 10V if Vcascode is set to 5V. 5V
was picked as a convenient voltage for Vcascode because it's likely to be the supply for the MAX7219/7221.
However Vcascode can be set to a lower voltage, such as 2V, by simply dropping the 5V supply through a zener
diode (Figure 3). Only one zener diode is needed to serve all the digit drivers.
RSET connected to the ISET pin of the MAX7219/7221. The maximum segment current is 40mA. To drive a higher
segment current, external transistors and segment current limiting resistors are needed (Figure 4).
required for the segment drive switch Q1. The segment drive current can be set to be an appropriate value using
RSET to turn Q1 on hard. Resistor R4 is needed to ensure Q1 turns off reasonably fast at the end of each digit's
Are you using this setup
Also any thoughts if another transistor would be ok in place of the mosfet?
,,,Or any help in how to find the correct..mosfet,,thanks
I am using the setup you asked about ,, but when i changed the Iseg "R",
from 150k ohms to 39 k ohms,,,it did not seem to saturate Q1 any more,,,so at 1.2 volts across Q1,,( in both cases),I assumed its saturated with either Iseg "R",,,but I still would like to be able to measure it,,,,either that or digit current.
"I think I see the problem now,,,I picked a mosfet,,,that needs a negative voltage" - it's a P-mos transistor, the notation for P-mos transistors use negative numbers, where as an N-mos transistor uses the notation of positive numbers.
I'm not sure what a D-mos would do
A JFET is functionally the opposite of a Mosfet transistor. A Gate voltage causes it to turn 'Off' rather than turn 'On', but that's not what you want here.
JFET's are only to be used in low current applications because their Rds'On' is very high compared to a Mosfet.
The circuit you are using appears to be correct, but I suspect that the Rds 'On' of the p-mos might not be enough to keep up with your current demand. Do you know how much current your application needs to switch through the p-mos?
they are six leds per segment with a resistor (aprox 150 ohms ) per each group of 3 leds,,,(in series) then the next group are parallel to this one.
The ribbon comes in 15 foot lengths,,and you cut what you want.
they run on 12 volt.
Can I ask one thing,,to clear up my understanding.
The gate of the mosfet will never go negative,correct? but as long as we gate it with LESS voltage than the source,,,,IS THAT CONSIDERED NEGATIVE?
ie, is it a absolute value,,,where positive 4 volts is actually negative 8 compared to +12
The leds are the string type leds,,they have groups of 3 leds in series,,with 150 ohm. It comes in a 16 foot long roll,,,and you cut to suit,,,i use 6 leds per segment,,,many thanks for all the replys.....well see post below...NOW back to not working,,possibly too tired
The R ds,,,data sheet is test conditions for 10 volt V-gs..( where I have aprox6volt,,,..(toggleing between 12 to 4...switching it off/on).... the test current is 10 amp....on the data sheet,,,mine is running 30 Ma...so possibly too little current?.
upon further investigation,,,it seems like if I increase I seg current to saturate the segment transistor,,,the 4 volts appears on the mosfet,,and if i lower I seg..( by going to the recommened 150 K ohms ) the extra voltage appears on the unsaturated Q1 segment transistor. I really think its a poor design,,,and either a pnp could work ( in place of the mosfet ),,rather than a mosfet...or a different cct driving the mosfet,,
The leds are the string type leds,,they have groups of 3 leds in series,,with 150 ohm
This maybe part of your problem as well you may need change this resister to a higher value Just an :idea: as well
Digit Drive Sink Current V+ = 5V, VOUT = 0.65 VIDIGIT 320 mA
This is where the Problem may be why you are not getting more current out of the Mosfet Just an :idea: as well
That would be some thing that I would try if I where doing this project
For me I do not like data sheet just show what type of part to use but no part #
I hopr this helps
Figure2 shows a Q3 transistor but the base has 5 volt and the collector has 12v,,,,seems this is stopping the base from being fwd bias.( at least hard)
also the app notes states 5 volt will drop across the 1K resistor ( R3 ),,with 5 ma flow....I measure 1 volt drop and 2 ma flow....Any suggestions...possibly a completely different digit drive cct..Thanks
Because its multiplexed and digits are turned on at different times,,,then also segments are pulsed at different times,,( to display the needed number)..I find it very difficult to just say what current and voltages are at any instant in time.I have a two channel scope,,,but I still seem to feel the display is running too low a voltage,
I have a LTS 3401 LE two digit display with 330 ohm resistors in series with each segment..( later I was going to use the ribbion style leds to make my own segments...which DO run on 12 volts,,,thats why i need 12 volt,,,also the 3401 display should have been fried at 12 volts...(30 Ma should have burnt that display out...so I know the max is not putting out 12 volts)...both displays the ribbon and 3401 are reading aprox 6 volts..
I adjusted scan to 1...which did increase the brightness....is the max brite only 15 on the initialization..Thanks for any help
Any how,,many thanks to all...also,
Upon redrawing the circuit,i can see now, only Q1,the display.and the mosfet.are in series,,,with the 12 volts.
I would have not noticed that small difference,,,except i had experience with the ribbion style led string,,,and i noticed it was not at normal brightness...I know i would have not noticed that small difference on a 7 seg display...or a regular led.
One question,,,remains...I get the maximum Rated current on the 3401 - 7 segment display at around 6 volts,,( 25 ma),and /but with the max 7219 at 12 volts...I can only get 12 ma assume its because the voltage is pulsed so fast,,,but any way it appears good now,,,What causes the brightness voltage or current,,,,or I think its a false amperage reading on the DMM because of the frequency...
What part # for the transistor and mosfet
Thanks for your time
I just got the free sample in the mail this week I would like to try this my self could you post a working tet code for me to play with