Problem interfacing with external devices
Paul Baker
Posts: 6,351
I have a board which was pulled from surplus medical equipment. On it is 3 HDLG-2416s (http://www.yocous.go.ro/stor/hdlg2416.pdf) with the /CE tied low and a 74HCT138 which drives the write signal to each. I have it displaying the simple 'Hello World' message, I have solved the timing issue caused by the 74' part (It would operate when I stepped, but not when it ran). But I found that when using the oscillator, sometimes when I would plug in the power connector, the message would not display, even if the reset button is pressed (but sometimes it would work when plugged in). I thought that I wasn't giving the board enough time to settle before pumping it information, so this morning I put a delay loop in my program after initialization of the SX ports but before I sent it data. Now it never runs with the oscillator plugged in. I tried putting a cap between the Vdd and Vss of the board to make the supply rise more slowly (in case its getting latched into a freak state from the power on surge) still no help. I removed the delay loop, still cant get it to ever work with the oscillator.·But when I am in debug mode of the SX-Key and I press Run (or walk through)·it always works perfectly, but if I press run from the main window it doesn't (which makes me think its not the oscillator). And now Ive run out of ideas to fix it.·Has anyone encountered a similar problem interfacing with an external part?
Paul
Paul
Comments
You said, "But when I am in debug mode of the SX-Key and I press Run (or walk through) it always works perfectly, but if I press run from the main window it doesn't (which makes me think its not the oscillator)" If anything, it should make you think the exact opposite. When you're debugging, the SX-Key is providing the clock. When you program the SX chip for independent operation (via Run->Program or CTRL-P) and then pull the SX-Key and hook up your oscillator, then your clock is the only clock source.
If it's not working when the SX-Key is gone and your oscillator is hooked up, you have to start with the assumption that something is wrong with your oscillator (since it's the only one present) and then start working on to different possible solutions if the oscillator checks out okay.
Things that can help folks help you diagnose these types of problems are:
Thanks, PeterM
DEVICE SX28AC, OPTIONX, TURBO, OSCHS
IRC_CAL IRC_FAST
FREQ 50_000_000
RESET Main
I am using the 50Mhz resonator supplied with the SX-Tech board, the reason I dont think its the resonator is that when I hit run from SX-Key Main window (Ctrl-R) the same thing happens as with the·resonator (it doesn't work), but when I press run just after entering the debug window, everything works fine. I don't know enough about how the SX-Key does things·to understand how running the program using the different methods (program, debug mode, run vs program, run) is different.
Paul
Post Edited (Paul Baker) : 1/16/2005 7:50:37 PM GMT
Paul
I have included the code in its present state. When I press the reset button whether it works or not is a Smile shoot, I'd say about 10-20% of the time its correct, the rest its not. GDI I need a DScope.
Post Edited (Paul Baker) : 1/17/2005 12:28:20 AM GMT
Paul
Oh yeah, another thing its behaviour changes with time. I went and ate, came back plugged it in and out maybe 10 times before it worked, sat here typing for maybe 5-10min with the thing on, now everytime I unplug and replugged it in it worked. The specs say nothing about needing warm up time that I remember.
Post Edited (Paul Baker) : 1/17/2005 1:06:53 AM GMT
Paul, smacks his forehead and leaves a red mark.
Cheers,
Jim
Paul won't make the same mistake again.
Post Edited (Paul Baker) : 1/17/2005 5:08:59 PM GMT
Paul, will be unconscious soon if he continues to get whacked by the 2x4 of oversight.
I think there should be an emoticon for whacking yourself for being dumb.
Post Edited (Paul Baker) : 1/17/2005 4:59:46 PM GMT
Paul
I've come to define progress as making the mistakes as fast as possible. I figure once I get past all of them, some actual work can get done.
Just one complaint: PLEASE don't suggest another icon! Especially not one that moves... I can't tell you how distracting I find the little bastards as it is. The two that jump up and down are the worst. They pull my eye away from the message I'm typing at least several times each reply. I could live with it if not for those two.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!
You nailed it as far as these sillyand distracting little blurbs are. I wish they could all be trashed. Don't folks have any real work to do??
Peter
Don't you recognized a l33t h4x0r when you see one?
This is my work dude!
Very big tongue in cheek grin!
Jim
Secondly, is there a good online resource discussing the all the variations of the 74 series IC's and the significance of using an LS vs. HC vs. HCT parts.
Peter
Forest: I'll look around for a resource when I'm bored tomorrow (its bound to happen). Off the top of my head there is alot more hysteresis in an LS part (Low Power Schmitt Input) than CMOS parts. And there are alot more variations (ALS, AHLS, ALVS,...), if I need to, I compile a list and thier characteristics. Since this is off topic I'll start a new thread in the sandbox forum. Perhaps some stampers can use the info as well.
Paul
btw mem is working fine, display still has some quirky behavior, but if I intialize it by writing spaces to the display repeatedly before writing real data I works predictably.
Post Edited (Paul Baker) : 1/18/2005 3:21:26 AM GMT
2) 74 HC and HCT devices should usually be pin compatible as far as the functions of the pins go. Whether they are drop in replacements depends on the characteristics of the circuits they are being used with and the power supply used.
Don Wade
Paul