SX/B and BS2 SHIFTOUT commands act different ??
I have written a program (although not complete for the BS2) that connects to an AD-801-B 16x32 LED matrix. It uses 3· Serial In· LED driver chips much like the 595 in some ways. The first 16 bit shift register LED driver (LC7932M) controls the rows 1-16 and the remaining 2 LED drivers (LC7932M) on the AD-801-B drive the 32 columns.
The BS2 program strangely starts sequencing 1 LED on/off starting at the 9th row, 1st column to the 8th column. Then the program sequences the LED on/off on the 16th row, but at the 16th to the 23rd column. I can not get them to cycle across all 16 columns (nor all 16 rows - EXCEPT IN THE SX/B program). All that is really different is the use of the \BITs optional command (BS2) or \COUNT optional command (SX/B) for the SHIFTOUT command. On the BS2, if I use the \16 (for 16 bits output) the display is blank.
However, in the SX/B version i can use the \16 command the output is quite different better in someways.
In the SX/B program I see all 16 rows ON starting at column 1 and it sequences the LED on/off accross all 32 columns. However, when entering in a value for SIN_1 (that controls the rows),...all the row LEDs turn on in the particular column. I can change the pattern on the columns to whatever I want and it does work but on the rows it only works with 1 or values not related to 2, 4, 8, 16. It is weird.
Why are the displays so radically different between the BS2 version and the SX/B version?
BS2
ooooooooooooooooxxxxxxxxxxxxxxxx
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
xxxxxxxxxxxxxxxxoooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
The "x"s turn on and off starting at row 9, col 1 to row 16, col 16.
SX/B
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
x -> sequences in an up/down column all the way across.
Any explainations of what's happening here?
Post Edited (T&E Engineer) : 6/3/2007 11:21:51 PM GMT
The BS2 program strangely starts sequencing 1 LED on/off starting at the 9th row, 1st column to the 8th column. Then the program sequences the LED on/off on the 16th row, but at the 16th to the 23rd column. I can not get them to cycle across all 16 columns (nor all 16 rows - EXCEPT IN THE SX/B program). All that is really different is the use of the \BITs optional command (BS2) or \COUNT optional command (SX/B) for the SHIFTOUT command. On the BS2, if I use the \16 (for 16 bits output) the display is blank.
However, in the SX/B version i can use the \16 command the output is quite different better in someways.
In the SX/B program I see all 16 rows ON starting at column 1 and it sequences the LED on/off accross all 32 columns. However, when entering in a value for SIN_1 (that controls the rows),...all the row LEDs turn on in the particular column. I can change the pattern on the columns to whatever I want and it does work but on the rows it only works with 1 or values not related to 2, 4, 8, 16. It is weird.
Why are the displays so radically different between the BS2 version and the SX/B version?
BS2
ooooooooooooooooxxxxxxxxxxxxxxxx
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
xxxxxxxxxxxxxxxxoooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
The "x"s turn on and off starting at row 9, col 1 to row 16, col 16.
SX/B
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
xooooooooooooooooooooooooooooooo
x -> sequences in an up/down column all the way across.
Any explainations of what's happening here?
Post Edited (T&E Engineer) : 6/3/2007 11:21:51 PM GMT
Comments
I think someone else mentioned something about the "\" option with shiftout. I will investigate the problem.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
What is strange is how differently it does not work as to what I would think under BS2 SHIFTOUT. I will try to post a couple of You Tube video's tonight if I can.
Thanks.
Dan
Does anyone know off hand how the BS2 handles this ?
[noparse][[/noparse]edit] It looks like SX/B sends bits 3,2,1,0 in this situation. It also assume \8 even if a WORD variable is specified. I'll have to check maybe the BS2 sends the high order bits, that could cause the difference in function.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
Post Edited (Bean (Hitt Consulting)) : 6/4/2007 7:02:35 PM GMT
Post Edited (JonnyMac) : 6/4/2007 10:30:00 PM GMT
Dan
· Thanks for setting me straight about the BS2 shiftout.
Dan,
· Are you using the latest version (1.51.03) ? I just checked a shiftout with \16 and it seems to be outputting 16 bits just fine.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
Post Edited (Bean (Hitt Consulting)) : 6/5/2007 12:27:00 PM GMT
At the risk of sounding dumb, I looked all over the software and couldn't find the version for SX/B. I'm on SxKey 3.2. Looks like I need to download the latest stuff (3.2.3). The help file for SX/B had a version 1.42.01 17 Oct 2005. I'd swear I downloaded your latest help file...guess I was wrong.
Update:
OK, have the latest stuff, but the Help File states SHIFTIN accepts a parameter from 1-8 specifying the number of bits to input. Can it be more than 8?
Dan
Post Edited (DosManDan) : 6/6/2007 5:28:41 AM GMT
If someone could please look over my SX/B program and tell me how I can read in the data2 and data3 statement in using probably READINC statements, it would be appreciated. I tried and it did not work right at all.
I have also included the PBASIC version of the program to show how a BitIndex Function routine written by JonnyMac saved alot of code duplication at least in SX/B. Very nice and thanks to JonnyMac for his Function routine.
There must be an easier way to reduce all of the data2 and data3 statements into READINC and DATA statements. I have already put them into dat2 and dat3 DATA statements for your convinience.
Thanks!
Post Edited (JonnyMac) : 6/8/2007 4:44:26 AM GMT
Thanks again. You always come through for me and so fast too!
Thanks again!