6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Apr 19, 2024 11:10 pm

All times are UTC




Post new topic Reply to topic  [ 564 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 38  Next
Author Message
 Post subject:
PostPosted: Mon Nov 02, 2009 9:34 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
GARTHWILSON wrote:
It may be that the one oscillator is taking longer to stabilize than the other—maybe different brand, slightly different design, or whatever.

That may be it. I've seen instances where oscillation takes several hundred milliseconds to start after power on. The DS1813 holds reset down for about 150ms, which may not be long enough if the oscillator is slow to start—e.g., the MPU would be ready to go but a stable Ø2 clock would not be available. Subsequent pressing of the reset button would restart the MPU but by then Ø2 will be stable, so the system boots without incident.
——————————————————
Additional Thoughts 11/03/2009

In studying the DS1813 data sheet a bit more, it is clear that the nominal 150ms period in which reset is held low after Vcc stabilizes could be extended with a simple RC delay circuit. A resistor would be placed in series with the Vcc connection on the DS1813 and a capacitor placed across the DS1813's Vcc and ground connections. This might be less a hassle than using a 555 timer to handle the reset sequence.

My theory is based on the fact that following initial application of power, the DS1813 maintains reset low. Once Vcc at the DS1813 rises to approximately 80 percent of the device's nominal Vcc rating, the 150ms "timer" is started and only when that time has expired does the DS1813 allow reset to go high. It would stand to reason that anything that extends the apparent rise time of Vcc should have the effect of extending the amount of time that reset is held down.

The current drawn by the DS1813 is very low (30-40 µA), so a reasonably-sized resistor will have negligible effect on the voltage seen by the device. For example, a 3.3k resistor and a 220µF capacitor would produce a time-constant of about 0.72 seconds, with the resistor causing a nominal 0.13 volt drop, well within the DS1813's tolerance. Or, you could use a 2.2k resistor and a 330µF capacitor to achieve about the same time-constant, but with less voltage drop.

A bit more than two time-constants are required to get pin 2 of the DS1813 high enough to start the 150ms sequence (the actual time depends on which version of the DS1813 you use). Therefore, the total reset period at power-on would be around 1.6-1.7 seconds using the above values. If the Ø2 oscillator isn't stable by then it should be replaced with a better device.

A small signal diode (e.g., a 1N4152) should be connected across the series resistor, with the anode connected to the junction of the resistor, capacitor and pin 2 of the DS1813. The purpose of the diode is to provide a low resistance discharge path for the capacitor when power is removed. Otherwise, short-cycling power to the computer would prevent the DS1813 from executing another reset cycle due to the time required for the voltage at pin 2 to decay. Also, an external pullup resistor is required on the reset line with this configuration (2.2k to 3.3k is good). In any case, the DS1813's internal pullup should not be relied upon, as it varies widely in value—as high as 7.5k, and even if at the nominal 5.5k value quoted in the data sheet, is too high.

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 07, 2009 11:21 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 990
Location: near Heidelberg, Germany
Quote:
Quote:
Imagine even the usual ".byte $2c; label: LDA #$CC" in a C64. The code executing the "$2c" opcode is actually a "BIT $CCA9" - what register is that in the CIA's mirrored register file? Accidently reading the interrrupt register and clearing them is not good. (I've made the address values up, too lazy to look them up now but you get the idea)

The .byte $2C (and .byte $24) trick, although lamentably common with 6502 machine code, is usually bad practice, precisely for the reason you described. I recall years ago describing the sequence as a "harmless BIT instruction." Obviously, if it BITs a register, it's not harmless. I have to admit having used that technique now and then but generally have stayed away from it. If someone who worked for me did that I'd have to castigate him for writing booby-traps into his code. :)

BTW, all C-64 I/O hardware appears in the $D000 range.


In fact the 6502 itself is a "bad" CPU when it comes to illegal address memory accesses. That's to the fact that there is no external signal that indicates a valid address, but all cycles are memory accesses.

From wikipedia:
Quote:
The NMOS 6502's indexed addressing across page boundaries will do an extra read of invalid address. This can cause issues by accessing hardware that acts on a read (e.g., clearing timer or IRQ flags, sending an I/O handshake, etc.). This defect continued through the entire NMOS line, but was fixed in the CMOS derivatives, in which the processor does an extra read of the last instruction byte.

The 6502's Read/Modify/Write instruction at effective address does one read and two write cycles. This can cause issues by twice accessing hardware that acts on a write. This defect continued through the entire NMOS line, but was fixed in the CMOS derivatives, in which the processor will do two reads and one write cycle.


IIRC it's not that critical tho, as the illegal addresses mostly come from high address byte being off by one (overflow from adding/increasing the low address byte).

And you should not use RMW operations on I/O registers...

André


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Nov 08, 2009 4:13 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
fachat wrote:
In fact the 6502 itself is a "bad" CPU when it comes to illegal address memory accesses. That's to the fact that there is no external signal that indicates a valid address, but all cycles are memory accesses.

To some extent, that issue has been addressed in the 65C816. It should be possible to set up true hardware memory protection, although trying to do so in discrete logic would be a timing nightmare.

Having jacked around with computer hardware since the days when an "interactive environment" meant pounding very terse commands on a Tele-Type keyboard and waiting several seconds for something to happen, I can tell you that all processors have their annoying quirks. Considering the age of the 65xx architecture and the circumstances in which it was developed, it's not bad, and is better than some of its contemporaries (the Intel 8088 by way of example, is a horse-**** design that reflects accountant-mentality thinking).

Quote:
And you should not use RMW operations on I/O registers...

That goes without saying, eh? Only an assembly language programming newbie would make that sort of boner. :)

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


Last edited by BigDumbDinosaur on Mon Nov 09, 2009 1:45 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: POC Computer
PostPosted: Sun Nov 08, 2009 4:34 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
Having reviewed my POC computer schematic and printed circuit board layout for the umpteenth time, I've concluded I've either eliminated all errors or cannot see the ones that are present. Accordingly, I have placed the order for PCBs, which should arrive by the end of the week. If you should happen to see a large mushroom cloud arise over the Chicago area, it is probably the POC computer detonating following power application.

One of the challenges I will face in assembly will be soldering the SRAM, which is an SOJ32 package, to the board. Unlike some of you other guys (and gals?), I'm at Social Security age and don't quite have the hand-eye coordination that made me such a killer on video games 30 years ago. :) 50 mil pin centers will be interesting to work with. However, I have watched some videos on hand soldering techniques (as well as read Daryl Rictor's travails with SMD slobbering...er...soldering) and am prepared to give it a go.

I do have a fall-back plan if I can't manage it. My oldest grandson is very skilled with small parts soldering and, being a hell of a lot younger than me, has much better hand-eye coordination. I'm prepared to swallow my pride and let him take care of the SRAM if need be. It'll be humiliating, to be sure, but that's what happens when you are old enough to be referred to in your family as a "geezer geek." :D

I will link to some pictures as soon as I have the first unit built.

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Nov 08, 2009 12:06 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Good luck! I am very close to making a board too, maybe a month or two. I'm still in the wirewrap stage. Looking forward to some pics, you have a very nice compact design.

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 09, 2009 2:22 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
ElEctric_EyE wrote:
Good luck! I am very close to making a board too, maybe a month or two. I'm still in the wirewrap stage. Looking forward to some pics, you have a very nice compact design.

In days past, when reasonably good PCBs in small (i.e., hobbyist) quantities cost a left lung and a right arm, I wore out several wire-wrap guns. With the advent of services such as ExpressPCB, the wire-wrap gun is breathing a lot easier these days. If the density is low and circuit speeds aren't in the clouds, I'll do wire-wrap or point-to-point (soldered wire-wrap sized wire) on a perf board. I decided the POC computer was too dense to do well in wire-wrap, so PCB it is.

I originally was going to size the layout to fit ExpressPCB's miniboard service. That, however, would have meant having the connectors hanging off the board from wires, adding to potential problems (especially with trying to connect leads from the MAX238 to the closely-space pins on the dual RJ45 receptacle. So I decided to use the 4-layer ProtoPro product. It costs more but will make assembly less difficult, as well as give me four boards to ruin instead of three. :D

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 09, 2009 3:21 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
If you can find a place to manufacture cheap from Gerbers, may I recommend Kicad? Tis open source, FREE and not too bad a learnign curve. Tis a little zany at times. but it does a pretty fun job and uses actual netting. I am using it for circuit layout but have yet to submit a Gerber series from it, though...

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 10, 2009 4:54 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
Nightmaretony wrote:
If you can find a place to manufacture cheap from Gerbers, may I recommend Kicad?

I haven't found such a place but did download Kicad. As soon as time is available I'll monkey with it and see how it works.

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


Top
 Profile  
Reply with quote  
 Post subject: POC Computer
PostPosted: Sat Nov 21, 2009 3:11 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
Argghhhh!!!!!

I got the PCBs to build my POC computer and prepared to populate the first one. The slobbering iron was good and hot, my 5-diopter work light was ablazin' and the logic probe and 'scope were trembling with excitement. I reached for my Olympus Camedia camera to take a series of pics as I slobbered parts to the board, just so others could see that if a big, broken-down old dinosaur with claws instead of fingers can do it, anyone could do it, even an untrained monkey.

Unfortunately, my camera decided to go belly-up and won't power on, even with fully recharged batteries. I tried everything I could think, including using my extensive...er...vocabulary to describe the camera. I even considered treating it as a football and sending it flying across the shop. Nothing! The thing just won't work anymore. Cheap piece of crap!!! Olympus should call the thing Camodia instead of Camedia.

Argghhhh!!!!!

Anyhow, I'll get another camera and then will have a few pics. I don't intend to let this momentous (?) occasion slip by without some sort of photographic record, especially the part where I put the juice to the board and something goes sizzle-pop-bang! :D

Argghhhh!!!!!

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 21, 2009 5:10 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
I have an Olympus Camedia camera too, and it still works fine after all these years. However, I've been storing it with the batteries removed. I do this in my feeble attempts at keeping the charge on the batteries as long as possible. But, it sounds like it might have a beneficial impact on camera longevity as well.

hmm...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Nov 22, 2009 4:41 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
kc5tja wrote:
I have an Olympus Camedia camera too, and it still works fine after all these years. However, I've been storing it with the batteries removed. I do this in my feeble attempts at keeping the charge on the batteries as long as possible. But, it sounds like it might have a beneficial impact on camera longevity as well.

hmm...

I've done the same with mine, for the same reason (evidently a clock or something in the camera is a bit power-hungry). Obviously, doing so didn't add any life to the hunk of junk. Mine was a 2 megapixel unit, so maybe it was time anyhow to get something a bit more current.

It could have been worse. Suppose I had gotten the photos and then later, when I went to transfer them to the computer, the Camodia had decided to go kaput? That would have been far more aggravating, possibly tempting me to take the camera to the nearby UP mainline and let Amtrak, which comes by several times per day at high speed, to deal with it. :twisted:

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


Top
 Profile  
Reply with quote  
 Post subject: Dead Camodia
PostPosted: Sun Nov 22, 2009 4:42 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
kc5tja wrote:
I have an Olympus Camedia camera too, and it still works fine after all these years. However, I've been storing it with the batteries removed. I do this in my feeble attempts at keeping the charge on the batteries as long as possible. But, it sounds like it might have a beneficial impact on camera longevity as well.

hmm...

I've done the same with mine, for the same reason (evidently a clock or something in the camera is a bit power-hungry). Obviously, doing so didn't add any life to the hunk of junk. Mine was a 2 megapixel unit, so maybe it was time anyhow to get something a bit more current.

It could have been worse. Suppose I had gotten the photos and then later, when I went to transfer them to the computer, the Camodia had decided to go kaput? That would have been far more aggravating, possibly tempting me to take the camera to the nearby UP mainline and let Amtrak, which comes by several times per day at high speed, to deal with it. :twisted:

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


Top
 Profile  
Reply with quote  
 Post subject: Dead Camodia
PostPosted: Sun Nov 22, 2009 4:42 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
kc5tja wrote:
I have an Olympus Camedia camera too, and it still works fine after all these years. However, I've been storing it with the batteries removed. I do this in my feeble attempts at keeping the charge on the batteries as long as possible. But, it sounds like it might have a beneficial impact on camera longevity as well.

hmm...

I've done the same with mine, for the same reason (evidently a clock or something in the camera is a bit power-hungry). Obviously, doing so didn't add any life to the hunk of junk. Mine was a 2 megapixel unit, so maybe it was time anyhow to get something a bit more current.

It could have been worse. Suppose I had gotten the photos and then later, when I went to transfer them to the computer, the Camodia had decided to go kaput? That would have been far more aggravating, possibly tempting me to take the camera to the nearby UP mainline and let Amtrak, which comes by several times per day at high speed, to deal with it. :twisted:

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


Top
 Profile  
Reply with quote  
 Post subject: Re: POC Computer
PostPosted: Sun Dec 20, 2009 7:28 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
BigDumbDinosaur wrote:
Unfortunately, my (Camedia) camera decided to go belly-up...

Christmas came a little bit early and I now have a new camera to take pictures as I build up POC 1.0. First step will be to see if I can actually slobber the SRAM to the PCB. Them there SOJ32 packages look mighty small, even under magnification. :) Well, I do have four PCBs and an equal number of SRAMs to booger up. :D

BTW, prior to submitting the PCB to the board house, I had rearranged the layout to tighten up things. The board is now 6 inches by 3.25 inches (19.5 sqaure inches). I was able to shrink the length of the address and data line traces, which should keep a lid on reactive issues. At this point, I believe the upper limit on clock speed will be the setup time required by the Dallas 1511 watchdog timer. Computations suggest 8 MHz as the limit, but that may turn out to be a little optimistic. 'Twill be interesting...

PCB Layout

Checking Component Placements (photographed through 5-diopter magnification)

Memory Map

MPU Interface

RAM, ROM & I/O

External Interface

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


Last edited by BigDumbDinosaur on Tue Dec 22, 2009 7:44 pm, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: POC Computer
PostPosted: Sun Dec 20, 2009 9:42 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 990
Location: near Heidelberg, Germany
BigDumbDinosaur wrote:
'Twill be interesting...



Yes, it will :-)

You've left out some parts of the schematics I think. I am wondering, do you have any more RDY logic or do you run all parts with CPU clock speed?

A naming thing: WD and /WD are named as if one is the inverted signal of the other - but /WD is qualified by Phi2, while WD is not. I found such naming to easily be source of problems when you just mess them up, or you later need a real inverted version of one of those signals.

Looking forward to your results!

André


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 564 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 38  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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: