SX48 / SX52 setup and comparison to the SX28 question
I have a couple of·SX52 protoboards from Parallax on their way because the SX48 protoboards are on back order. As I have never worked with these chips (only the SX28), I want to get a feel of what is different in them. From what I have been able to find out the major differences between them an an SX28 is a few more input commands and more I/O pins. What I don't understand is why the SX52 is being discontinued if it has more capability (meaning 4 additional I/O pins on RA) than an SX48. Was there a problem in manufacturing the die for them or something?
Also is there any header differences (or hardware setup with the SX-Key) I should be aware of when setting up an SX52 as compared to my normal header for an SX28?
If the SX28 header is:
DEVICE······SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42
FREQ··········4_000_000
Would the·SX52 be:
DEVICE······SX52, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42
FREQ········· 4_000_000
??
Also is there any header differences (or hardware setup with the SX-Key) I should be aware of when setting up an SX52 as compared to my normal header for an SX28?
If the SX28 header is:
DEVICE······SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42
FREQ··········4_000_000
Would the·SX52 be:
DEVICE······SX52, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42
FREQ········· 4_000_000
??
Comments
With the SX48/52 you don't need 'TURBO, STACKX, OPTIONX' on the device line.
Just use:
DEVICE SX52, OSC4MHZ, BOR42
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Coming soon! Propeller based OSD module www.hittconsulting.com
·
You always have the answers!
I'm assuming that their is nothing else software/hardware wise different that I need to be concerned with then.
Although I do have a couple other questions - How do I set up an array that will use RA, RB, RC, etc. (e.g. 24 byte array)? Would this be a word of only 2 (being RA and RB· or·· RB and RC , RD, RE, etc) or can I combine all of the outputs as a big array word?
If you look at this list output for this you'll see that the TRIS registers for RD and RE are properly set. The other 16-pit port options are RBC and RCD.
Now let me ask you, Bean or anyone who knows...
If I was to set up a large LED matrix using an SX52, is their an easier method of usage on the arrays as it looks like the limitation is 16 bits (2 ports total)?
I am thinking of most likely a 16x16 but would an 8 x 24 be possible too - array wise? I see that arrays can be up to 223 or so bytes but if the ports can only handle 16 bits then I think it makes more sense to build a 16x16 than an 8x24 LED matrix. Does this make sense?
As you can guess, this is in reference to using·a modified·scrolling LED routine in the NUTS & VOLTS newest issue - CGoL (LIFE).
Also - sounds like I would want to use a WDATA for the Col_Mask data statement too.
Col_Mask:
· WDATA %00000000_00001111
· WDATA %00000000_00111100
· WDATA %00000000_11110000
· WDATA %00000011_11000000
· WDATA %00001111_00000000
· WDATA %00111100_00000000
· WDATA %11110000_00000000
· WDATA %11000000_00000011
Thanks for everyones help!
BTW, your Col_Mask table has multiple bits enabled -- is that what you really want? Another option is to create the column mask in code:
... and if the column output bit needs to be low, add this:
With an 8-row by 24-column display I would do something like this:
It should be obvious that colMaskLo16 is a word and colMaskHi8 is a byte.
The SX48 also has two 16-bit timers in addition to the regular 8-bit timer for the watchdog/RTCC. Apparently there is an error on the Parallax website about the SX48 as they only mention it has a single 8-bit timer and say nothing about the two extra 16-bit timers. Hopefully that will be fixed soon.
You'll find the SX48 is a nice chip!
Robert
I have started wiring the LED matrix for 16x16 (although there is room to change it to 16 rows x 24 columns-maybe later for that) as I thought this might be easiest to work with.
I saw the WDATA statement in the example code for SX/B and was wondering about the set of 1111 digits too JonnyMac.
I thought it should be like this:
Col_Mask:
· WDATA %00000001_00000001
· WDATA %00000010_00000010
· WDATA %00000100_00000100
· WDATA %00001000_00001000
· WDATA %00010000_00010000
· WDATA %00100000_00100000
· WDATA %01000000_01000000
· WDATA %10000000_10000000
I see more possibilities with a 16x16 in that it could be used to display crude pictures, 2 rows of scrolling text (clock on top, date on the bottom maybe), or anything that comes to mind.
If it is to be 16x16, is it better to have it as (1) 16x16· OR· (2) 8x16's (one on top of the other visually speaking)- for ease of use with the SX52?
ALSO can the SX52 handle a 16x16 LED display? I see that the SX28 can handle a 8x8 - as seen in the N&V article. I was going to use some driving transisors resistor circuits on one side (row·or column)·and ULN2003's on the other side (column or row) just in case. Let me know...
Post Edited (T&E Engineer) : 3/11/2007 7:28:01 PM GMT
There's no reason why an SX52 can't handle a 16x16 display; you might use "port" RBC for the cathodes and RDE for the anodes. I think you're right to buffer the cathode wth a set of ULNs because now you could have 16 LEDs lit at the same time.
However, I also just realized that having (2) 8x16's would require 6 ports (1 row and 2 columns)+(1 row and 2 columns) and the SX52 only has 5 ports which I wanted to use only 4 ports and have the other one for input controls or something.
Yes I could use (2) SX-28's like the RobOympics with 4028 chips but it would be nice to have a 16x16 display for a large picture display or something in I would guess (2) 16 bit arrays.
Can your math version still be used for a 16x16 or is it only for an 8x24?
I will buffer both rows and columns transitor/resistor circuits for the anodes (rows) and ULN2003's for the cathodes (columns). This will invert them so that the 16 rows (transistor/resistor circuit) will be negative inputs coming in and the 16 columns (ULN2003 circuits)·will be positive inputs coming in.
I beleive this is right.
Thanks JonnyMac!
Would it make any sense to·add more columns or leave it alone at 16x16?
Time to go to Radio Shack after work tomorrow. I have about 2 inches on the left and right sides of the perf board (LEDs are in the middle and to the top). There is about 1 1/2 inches of perf board on the bottom of the LEDs. This should leave enough room for the transistor/resistor circuits on the right side of the LEDs and ULN2003 chips on the bottom (under the LEDs).
I should have my SX52 proto boards on Tuesday which will leave me tomorrow night to solder the driver/buffer circuits and run wires or something to the SX52 proto boards.
I very much appreciate all the help and encouragement today to you guys and especially JonnyMac.
Thanks again!
As an intial test, I have only changed the DEVICE·line and·added xxxx PIN RBC OUTPUT and·yyyy PIN RDE OUTPUT lines. I compiled and it was not correct (e.g. no WDATA statements yet or math code from JonnyMac) but It actually showed scrolling left, right, up and down. It was off·in the placement but that's ok for now - just need to fix the code.
I·was more happy that I got through 3 nights of soldering all 256 LEDs and transistor/resistor circuits and ULN2803s and that all the LEDs came on as I hoped they would (even though they were not correctly displayed - just a mater of fixing the code). I would love to also display a picture or something at some point too on this new display. I think that by using WDATA on the RBC and RDE it should be possible.
Thanks again to all especially JonnyMac!
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A problem well defined is a problem half solved"
"Just because you're approved, doesn't mean you can afford it."
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Coming soon! Propeller based OSD module www.hittconsulting.com
·
Thanks again for the great support!
I'm getting inspired...
Let me see if I can find my soldering iron...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
I have attached code that I beleive should work but doesn't. It is for my 16x16 LED display and based off of Jon Williams CGoL scroll routine in the March Issue of N&V. I have spent days trying many different routines. I can get 8x8 in any quadrant to work and even modified the interupt code to scroll backwards, forwards, up and down. But I can't get past the 8x8 LED boundaries (e.g. scroll or display anything past 8 LED's worth).
Want I have attached is a program that should simply display 2 letters "S" and "X" but not scroll them. What I get is the letters repeated twice over 16 LEDs (by 8 high) AND the "S" is overlayed on top of the "X".
I have not understood JonnyMac "math coding" to get rid of the DATA collumn masking. WDATA statements (I know - pointer = pointer + 2). What I usually see is the same·pattern repeated twice over the 16x8 display screen.
Ultimately I would like to display data over all of the 16x16 LED display but for the moment I am stuck only seeing 16x8 and it is not displaying the information correct (as stated above).
Can someone look at the code and tell me more specifically what I am doing wrong. I don't get it after I have been studing Jon's code, the RobOympic code, and other information I get on the web.
Thanks for your support.
AnodesLo
AnodesHi
CathodesLo
CatodesHi
... so that you have complete control. Remember, words are synthesized and therefore not always convenient, and in some cases problematic. So, instead of:
I would do this:
I have updated my code (attached). I got a little better results but still unsure about how to name the variable aliases.
However, in all 4 8x8 quadrants I get only the last 8 bytes in the DATA statements. The first 8 bytes are not displayed.
I would like to be able to enter data statements that represent what will be on the 16x16 display not just in the individual 8x8 quadrants.
Please help when you can.
Thank you for taking the time to review the code. However, your code turns on all 256 LEDs and they stay on. Is there something I should check?
I did notice that if I modify the COL.4 = 0 to something like COL.2 = 0 ... I got some "rounded" display which might be the form of the smiley face circle. For example if the display has the following look where X was off and O was on:
XXOOOOOXXXOOOOXX
XXOOXXOOOOXXOOXX
XXOXOOOOOOOOXOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
XXOOOOOOOOOOOOXX
Otherwise
when col.4 = 0 I get all LEDs on
like this:
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
When I developing the 8x8 CGoL project I did the initial LED array testing without an ISR. You might create a scratch program -- without an interrupt -- that does something like this to validate the hardware:
This should march an LED across and up the display. Note that in my program, and I thought in yours, a "1" bit was on (either a column or a bit in a row).
I used your Smilley program and commented out the Interupt and Goto Interupt routine. I also commented out the Main program and copy and pasted your program in. See attached file.
I think this part is not quite a success because the LED you describe is "off" as it starts from the top left and goes diagonal to the bottom right corner as the column of 16 LEDs (top to bottom) go accross the display (left to right).
From the left side (all the rows in the first column turned on) and then it went to the next column until each column of 16 LED rows came on all the way to the right 16th column. Hopefully Im not getting my columns mixed up with my rows for you (eg. anodes and cathodes - depending on perspective).
As you can see it had a diagonal effect of the row LED being off (e.g. X) each time it went from left column to ending right column.
XXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXXX
THEN
XOXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
XOXXXXXXXXXXXXXXX
THEN
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
XXOXXXXXXXXXXXXXX
FINALLY IT ENDS LIKE THIS:
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXOX
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO
XXXXXXXXXXXXXXXXO <-·First was·X then went to·O.
Post Edited (T&E Engineer) : 3/18/2007 2:15:25 AM GMT
This iterative, "Here's what I got, what do I do now?" process isn't going to help. You have to knuckle down and and figure out how to move one lit LED from a corner of the display to the opposing corner. When you can do that, you will have solved the hardware interface and can move forward with the program. You may actually have a hardware error. In my program a 1 bit in the column enabled it, and a one bit in a row turned it on. The demo above should only have one LED on at a time IF your hardware works as mine did.
Post Edited (JonnyMac) : 3/18/2007 3:31:30 AM GMT
You have been a big help to me on this project. I will find out how to make the opposite of what I am seeing happen. From what I understand I should not have a full row of LEDs (top to bottom - moving left to right) on but only 1 in the row should be on (starting top left to bottom right). It is probably something simple that can be fixed with a NOT or ~ statement to either the Anodes or Collumns or possibly just need to invert the WDATA statements as they are being read in. I will let you know my progress in the morning.
Thanks again for your persistence.
I got your code (modified) to work.
Your test code:
Main:
··Cathodes·=·%00000000_00000001
··DO·WHILE·Cathodes·>·0
····Anodes·=·Cathodes
····PAUSE·500
····Cathodes·=·Cathodes·<<·1
··LOOP
··END
Your test·code (that I modified to get it to work):
tmpW2···· VAR··· Word
Main:
· tmpW2 = %00000000_00000001
· DO WHILE tmpW2 > 0
··· Anodes = tmpW2
··· Cathodes = ~tmpW2
··· PAUSE 500
··· tmpW2 = tmpW2 << 1
· LOOP
··END
As you can see by replacing Cathodes with a temp WORD variable AND then inverting the output it now produces a single LED·on·that starts at the upper left corner and goes diagonally to the bottom right corner. All other LEDs are off as they should be.
Let me know what the next steps are now that this is ready.
I have attached the code for your review.
Thanks.
I see the Smiley face on the 16x16 display. It is 90 degrees off (bottom of face points to left side) - but I think that is just a matter of changing the WDATA statements.
I am so happy with this and your OUTSTANDING effort JonnyMac!!!
Now - I will look at the previous coding and incorporate some scrolling routines to bring on other 16x16 pictures like the Smiley face.
You are the best JonnyMac!
Thanks again.
See attached code.
I have made my own simple smiley face in the attachments.
Pretty cool thanks to JonnyMac and Bean's Excel Tile Creator spreadsheet (both modified for this example program).
Thanks again. Now - work on scrolling....