6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 6:23 pm

All times are UTC




Post new topic Reply to topic  [ 118 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next
Author Message
PostPosted: Mon Aug 28, 2023 10:26 am 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 88
Location: UK
Day whatever: got the flash programmer rebuild done! It now fits in a much smaller footprint and has a ZIF socket for ease of use. I might add an external oscillator for the AVR, because at the moment it's running on the internal 1Mhz clock at 9600 baud, which works out to be about half the speed of the old one - still faster than I expected. I expect switching to shift registers over SPI instead of I2C sped it up a bit.

With the flash programmer done, I can now begin the inevitable arduous process of debugging. Wish me luck.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 31, 2023 1:05 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 88
Location: UK
As expected, I turned it on and it didn't work. I've been single-cycling it with an arduino and noticed something odd during the reset sequence: the data bus is always reading 0xFF, even when the flash should be outputting something else. I have no idea what could cause this, but it might be something dumb like the ram driving the data bus when it shouldn't. I can't understand why that would happen, though, because the ram is deselected when A15 is high.

Any help is appreciated.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 31, 2023 1:21 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8510
Location: Midwestern USA
allisonlastname wrote:
As expected, I turned it on and it didn't work. I've been single-cycling it with an arduino and noticed something odd during the reset sequence: the data bus is always reading 0xFF, even when the flash should be outputting something else. I have no idea what could cause this, but it might be something dumb like the ram driving the data bus when it shouldn't. I can't understand why that would happen, though, because the ram is deselected when A15 is high.

Any help is appreciated.

I skimmed through the entirely of this topic and didn’t see a schematic anywhere?  Did you post one?  Assisting you would be a bit easier if there is a schematic to review.

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 31, 2023 2:52 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 491
allisonlastname wrote:
As expected, I turned it on and it didn't work. I've been single-cycling it with an arduino and noticed something odd during the reset sequence: the data bus is always reading 0xFF, even when the flash should be outputting something else. I have no idea what could cause this, but it might be something dumb like the ram driving the data bus when it shouldn't. I can't understand why that would happen, though, because the ram is deselected when A15 is high.

Any help is appreciated.


Did you remember to tie BE (Bus Enable) high through a resistor (3.3k is a good value)? I got bit by that one on my first build.

Another possibility, everything is working, but you've got some address lines switched so you're reading from a different part of the flash than you think you are. (Empty flash memory is all 1s, just like with E/EPROMs.)

At one point in my recent project George suggested taking the CPU out of the circuit and driving the address lines directly in order to investigate if the support chips were responding correctly. That was a good idea, and might be useful for you here too.

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 31, 2023 9:25 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 88
Location: UK
BigDumbDinosaur wrote:
I skimmed through the entirely of this topic and didn’t see a schematic anywhere?  Did you post one?  Assisting you would be a bit easier if there is a schematic to review.


Here's the current version that I have on the breadboard.
Attachment:
output.pdf [292.36 KiB]
Downloaded 119 times


Paganini wrote:
Did you remember to tie BE (Bus Enable) high through a resistor (3.3k is a good value)? I got bit by that one on my first build.

Another possibility, everything is working, but you've got some address lines switched so you're reading from a different part of the flash than you think you are. (Empty flash memory is all 1s, just like with E/EPROMs.)

At one point in my recent project George suggested taking the CPU out of the circuit and driving the address lines directly in order to investigate if the support chips were responding correctly. That was a good idea, and might be useful for you here too.


BE is tied directly to 5v. I've already double- and triple-checked the flash address lines but I guess it wouldn't hurt to go back through them again. The CPU is pretty hard to access because of how dense the wiring is, but I guess I could pull BE low, hold it in reset, and drive the lines from an arduino.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 01, 2023 12:34 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
Why do you have the I/O deselected every time A5 goes high? Or am I reading this wrong?

Actually it says "a85". Where is a85 generated?

Maybe it should read "a8". That would make sense.

_________________
Bill


Last edited by BillO on Fri Sep 01, 2023 12:40 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 01, 2023 12:36 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8510
Location: Midwestern USA
I examined the schematic.  Nothing is jumping out at me.  I’m suspecting a wiring error, faulty boot code or a faulty part.  Are you sure about your chip select logic?

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 01, 2023 12:36 am 
Offline
User avatar

Joined: Fri Feb 17, 2023 11:59 pm
Posts: 163
Location: Lviv, Ukraine
Just wondering - is there a reason why you're pulling /RST high? DS1813 should work just fine without it.

Also, my tip on /RST: I always wire it through an inverter to a LED (so that it lights up when /RST is asserted). This helped me find many short circuits, since DS1813 will pull the output low if its input voltage drops below some threshold (kind of a brown-out detection).

_________________
/Andrew

deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 01, 2023 12:38 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8510
Location: Midwestern USA
and3rson wrote:
Just wondering - is there a reason why you're pulling /RST high? DS1813 should work just fine without it.

The pullup inside the DS1813 is weak.  An external pullup makes the circuit a lot less noise-sensitive.

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


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

Joined: Mon Mar 06, 2023 9:26 am
Posts: 88
Location: UK
BillO wrote:
Why do you have the I/O deselected every time A5 goes high? Or am I reading this wrong?

Actually it says "a85". Where is a85 generated?

Maybe it should read "a8". That would make sense.


It's a8 going into pin 5 of the 75hc00. It's more clear on the coloured version of the schematic, but I did it in black and white because I remember someone being colourblind.

and3rson wrote:
Just wondering - is there a reason why you're pulling /RST high? DS1813 should work just fine without it.

Also, my tip on /RST: I always wire it through an inverter to a LED (so that it lights up when /RST is asserted). This helped me find many short circuits, since DS1813 will pull the output low if its input voltage drops below some threshold (kind of a brown-out detection).


In the test setup I'm using, the clock and /RST are driven by an arduino.

BigDumbDinosaur wrote:
I examined the schematic. Nothing is jumping out at me. I’m suspecting a wiring error, faulty boot code or a faulty part. Are you sure about your chip select logic?


I'll go through and check all the address lines again in the morning.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 01, 2023 4:24 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 88
Location: UK
Turns out I'd forgotten that the ROM has a15 tied low, so when the CPU accessed the reset vector it accessed 0x7ffc, not 0xfffc. Yes, I feel pretty stupid.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 02, 2023 5:00 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
allisonlastname wrote:
Turns out I'd forgotten that the ROM has a15 tied low, so when the CPU accessed the reset vector it accessed 0x7ffc, not 0xfffc. Yes, I feel pretty stupid.


No need. We all have made "silly" mistakes. The encouraging thing is you found it. Nice work.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 02, 2023 6:03 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8510
Location: Midwestern USA
allisonlastname wrote:
Turns out I'd forgotten that the ROM has a15 tied low, so when the CPU accessed the reset vector it accessed 0x7ffc, not 0xfffc. Yes, I feel pretty stupid.

No need to feel stupid.  We’re not designing airplanes or space shuttles here, so no lives are in danger if your machine fails to perform.  :D

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 02, 2023 6:29 am 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
BigDumbDinosaur wrote:
allisonlastname wrote:
Turns out I'd forgotten that the ROM has a15 tied low, so when the CPU accessed the reset vector it accessed 0x7ffc, not 0xfffc. Yes, I feel pretty stupid.

No need to feel stupid.  We’re not designing airplanes or space shuttles here, so no lives are in danger if your machine fails to perform.  :D

I commented decades ago that I wouldn't be able to handle that responsibility, and I'd want a whole string of people checking my work.  I said this to someone who worked in the space program, and he said, "We do have such a chain, and we still get failures!"  I did some consulting a few years ago for satellites; but although it was super expensive to launch them into space and there was no retrieving them for a repair if there was a failure, at least they were unmanned, so no lives were on the line.

_________________
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: Sat Sep 02, 2023 4:58 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 88
Location: UK
IT'S ALIVE!
Attachment:
IMG_20230902_175056242.jpg
IMG_20230902_175056242.jpg [ 226.36 KiB | Viewed 289805 times ]


Pictured is the Wren Prototype running my sanity check program at full 1mhz speed. The program consists of loading from the VIA's port A (inserted for low speed test runs to make sure the VIA was working), then writing 1 to DRRA and port A, followed by an endless loop. As can clearly be seen here, it's working.

The LEDs are (in order, left to right) read/write, a15, /ROM select, /IO select, /VIA select, SYNC, VIA PA0, and a testing LED that I was poking the buses with on single-cycled runs.

_________________
probably the youngest person on this forum


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

All times are UTC


Who is online

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