Help with Stampworks 11 please
Hello.· After a few days of frustration, I would appreciate some help please.
I am converting Stampworks 11 to SX/B (for educational purpose).
I've checked the code but I must have made a mistake somewhere as LCD does not work at all (there is power, but no intelligent characters).
Connections:
RA.0· --- DB0/DB4 on PDB
RA.1· --- DB1/DB5
RA.2· --- DB2/DB6
RA.3· --- DB3/DB7
E····· --- RC.7
RS··· --- RC.6
I suspect I've not correctly translated this code:
BS2:···································SX/B:
LCDBus VAR OutB················· LCDBus VAR RA OUTPUT
Later in the code, the BS2 version has:·
LCDbus = %0011
In SX/B, I wrote this as:
LCDbus = %0011·· Is this·allowed in SX/B·since LCDbus was defined as OUTPUT?
I attach my file here.
I am converting Stampworks 11 to SX/B (for educational purpose).
I've checked the code but I must have made a mistake somewhere as LCD does not work at all (there is power, but no intelligent characters).
Connections:
RA.0· --- DB0/DB4 on PDB
RA.1· --- DB1/DB5
RA.2· --- DB2/DB6
RA.3· --- DB3/DB7
E····· --- RC.7
RS··· --- RC.6
I suspect I've not correctly translated this code:
BS2:···································SX/B:
LCDBus VAR OutB················· LCDBus VAR RA OUTPUT
Later in the code, the BS2 version has:·
LCDbus = %0011
In SX/B, I wrote this as:
LCDbus = %0011·· Is this·allowed in SX/B·since LCDbus was defined as OUTPUT?
I attach my file here.
Comments
I worked on a conversion of Parallax's PBASIC program for the·parallel LCD into·SX/B a few months back.
The pins used may be different from yours.
Post Edit -- If you're interested in following that adventure:
http://forums.parallax.com/showthread.php?p=688602
Post Edited (PJ Allen) : 9/13/2008 3:26:24 PM GMT
Msg:
DATA "SXB", 0
It shows "o<-/___ _oo/O/" etc. Junk.
Do I have to find ASCII equivalent of SXB? and store them in DATA statement?
My program displays some letters.· Does that much work?·
Or is it after you incorporate it with your plan that it goes to garbage?
DATA "SXB"...· I'm not certain that's OK.· How's DATA "S", "X", "B" ?
I put 500 ohms pull down resistors to ground (for each of RA.0 to RA.3).
My schematic shows 4.7KΩ ("4K7")·pulldowns.· It also shows series resistors which should be 220Ω.· I like to keep a series resistor in circuit that way, they're not exactly "necessary."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
When all else fails.....procrastinate!
Shawn, I changed the DEVICE and FREQ so it works.
Thanks for your help.
As an exercise I ported SW #12 (custom characters) to SX/B using a 4-bit interface to the LCD. While PJ's program works just fine it uses old-style syntax and is not quite as efficient or flexible as we can be with SX/B today. The demo I've attached (which also works and requires no "fixing" [noparse][[/noparse]hint, hint....]) uses modern SX/B syntax, hence is very efficient and very flexible.
Note that I have moved the E pin to RB.1 and am using RB.0 for backlight control. I have tested this program on a PDB.
Post Edited (JonnyMac) : 9/13/2008 11:52:46 PM GMT
My frustration comes when I try to modify either your or PJ's program. I want to use RA as the 4 bits of data for LCD. Every time I tried using the RA port as data and RC as control pins
I get something on LCD, but it is half gibberish. That is I get something like "Hellv SX" one time and "Helvo X" another time. It changes for some strange reason, as if there is some noise affecting data to the RA port. And the message is close enough to what I want, so I know that I am not too far off, but I don't know what the problem is. I want to show "Hello SX/B".
How can I make your program work using RA pins for data?
RA.0 --- DB4 on PDB
RA.1 --- DB5
RA.2 --- DB6
RA.3 --- DB7
E --- RC.7
RS --- RC.6
Post Edited (JonnyMac) : 9/14/2008 4:13:19 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔