6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 6:13 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Sep 04, 2024 1:28 am 
Offline

Joined: Tue Sep 26, 2023 11:09 am
Posts: 109
I have a typical 65c02 breadboard setup @ 1MHz which is working nicely (4x20 LCD, SD card, kbd, running forth etc).

I read somewhere on here about the EconoReset part so figured I'd wire one across my /RES pushbutton to debounce it. (sure "if it ain't broke..." but that's half the fun :)

But now when I power up the initial startup is fine (it plays a little speaker init sequence) but then immediately resets again when it tries to initialize the LCD screen, and so just plays the startup sound in an infinite loop. Reading the datasheet more closely, I realize it is presumably triggering because the LCD init is causing the voltage to dip below its trigger point. (I think I have the 5% threshold part, number is DS1813-5T&R)

I'm powering the board from a bench power supply at 5.00V and over-current protection @ 300mA. There is definitely a current spike when the LCD initializes, but I don't think it was exceeding that threshold. Maybe momentarily tho?

I'm still new at all the hardware stuff. Any recommendations for how best to avoid the repeated reset? Is a small increase in input voltage or current threshold likely to help? (I do like that ocp helps me fry fewer parts...). Thanks to previous advice here I've already sprinkled lots of capacitors and more power gridding on the board, but maybe I need a bigger one to help serve the LCD?


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 04, 2024 1:38 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
These LCDs are very miserly on the current, except for a backlight if you have one.  Backlights are a power hog.  Is it that you're turning on the backlight at that time?

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 04, 2024 2:04 am 
Offline

Joined: Tue Sep 26, 2023 11:09 am
Posts: 109
yes, there is a backlight. i don't exactly where in the init that it fails, its the usual HD44780 so I do the normal wake x 3 plus the init sequence (8-bit, 2-line, 5x8 font, display on, cursor/blink off) and then clear/home (random side question - why does that take 1.5ms according to the datasheet when everything else is measured in microseconds?!).

at some point in that process the backlight will normally cycle off and on. the steady state draw for the whole setup is a little under 100mA but there definitely is some kind of spike as the LCD starts up.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 04, 2024 7:07 am 
Offline

Joined: Tue Sep 03, 2002 12:58 pm
Posts: 336
What sort of wires do you have connecting the power supply? If they're particularly long and particularly thin, there will be a voltage drop that the supply doesn't know about (it only sees the voltage at its terminals). At peak current that drop might be enough to trip the reset. Measuring the voltage both at the supply and on the board should tell you this needs addressing. I generally prefer to have the regulator on the board, with a higher supply voltage, to be certain that I'm getting the voltage I think I am.
Also, do you have adequate filtering capacitance on your board? Even if the average voltage is OK, if it's noisy enough there could be dips below the reset threshold. You typically need a range of capacitors to cover the frequencies in play.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 04, 2024 11:09 am 
Offline

Joined: Tue Sep 26, 2023 11:09 am
Posts: 109
Here's a couple thousand words worth of pics.

I don't think the wires are particularly long. There are a bunch of 100nF and a few 10uF caps on the power rails near components, and crisscross grid.

(strike this:) It seems the culprit is actually the keyboard - this hosts a pro micro (RP2040 MCU).

Correction: disconnecting the kbd stops the reset cycle, but the kbd isn't involved in the 6502 init sequence or connected to the reset line and quickly gets into a quiescent state where it's sitting waiting for keypresses. So although it might be dragging down the overall current draw, I think the LCD on/off cycle during init is what triggers the actual reset.)

I'm still learning the scope but managed to trigger a trace during one of the reset events. The voltage drops to about 4.8V (vertical grid 50mV) and recovers to 4.9V after about 5us (horizontal scale 1us). I guess the other spikes are due to the two 1Mhz clock edges per 1us? I measured near where the PSU connects to the breadboard.

I'm not sure i'm reading the ds1813-5 datasheet correctly but it seems to say the typical trip point is 4.6V (though 5% of 5V might imply 4.75V?). So maybe it's borderline.

I don't see an obvious spike in current draw on the power supply but maybe it's momentary. Could I use the scope reading to size a larger capacitor to serve the momentary excess demand? Or something else?


Attachments:
scope.jpg
scope.jpg [ 767.15 KiB | Viewed 359 times ]
bboard.jpg
bboard.jpg [ 933.45 KiB | Viewed 359 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 05, 2024 11:11 pm 
Offline

Joined: Tue Sep 26, 2023 11:09 am
Posts: 109
It does seem like upping the current limit on the power supply solves it


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 06, 2024 12:55 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
pdragon wrote:
It does seem like upping the current limit on the power supply solves it

There are different versions of the DS1813, each with its own voltage threshold at which it releases or sinks the reset line.

BTW, although the DS1813 has an internal pullup, it’s weak and makes the reset circuit somewhat noise-prone.  For best results, you should have a 3.3K pullup in your reset circuit.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 06, 2024 1:59 pm 
Offline

Joined: Tue Sep 26, 2023 11:09 am
Posts: 109
yup, i think i have the 5% version. I can't quite make sense of how it's presented in the datasheet but I assume it means it will trigger around 0.95 * 5V ie. 4.75V which seems to be the case.

I still have the 3.3K pullup there from my unbounced reset switch, so all good I think.


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 06, 2024 4:46 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
pdragon wrote:
yup, i think i have the 5% version.  I can’t quite make sense of how it’s presented in the datasheet but I assume it means it will trigger around 0.95 * 5V ie. 4.75V which seems to be the case.

No.  The specific part number that you have determines the “trip” voltage.  I’m not sure about the meaning of the tolerance spec—I go by the part number suffix, which defines the nominal trip voltage:

  • DS1813-5   — 4.62
  • DS1813-10 — 4.35
  • DS1813-15 — 4.13

Dallas Semiconductor, while noted for the high quality of its products, was also noted for writing confusing data sheets.  When Dallas was bought out by Maxim, some effort was made to clean up the data sheets, but a lot of them are still a bit of a mess.  I ran into this with the DS1216E “smart watch” when I adapted it years ago to my Commodore 128D.  I ended up on the phone for about an hour with Dallas tech support...taking notes.  :D

With that said, a self-reset in your application due to voltage sag is an indictment of your power source or distribution...or both.  :D

Quote:
I still have the 3.3K pullup there from my unbounced reset switch, so all good I think.

Some years ago, prior to my start with my POC series, I had an occasion to use the DS1813 in something else I had devised, and initially omitted the pullup resistor, since the data sheet mentioned the presence of an internal pullup.  By sheer happenstance, I had an unrelated circuit problem with the device and moved it to my work bench to troubleshoot.  On the bench, the DS1813 kept going in and out of reset, although when it was on my desk in my office, things were fine.  It wasn’t the power source or connections, so I surmised noise was the culprit, proved with a quick check with the ’scope.

It turned out, “hash” from the fluorescent lamp in the bench’s magnified work light was triggering the spurious resets.  I decided to add a pullup to the circuit and voilà!  No more spurious resets.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: