6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 8:02 pm

All times are UTC




Post new topic Reply to topic  [ 269 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 18  Next
Author Message
PostPosted: Mon Jan 05, 2015 8:15 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10981
Location: England
If you run a linux program using strace, the last few OS calls will often give a clue as to what caused the problem.

strace -o strace.out command arg1 arg2

less strace.out


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 05, 2015 10:12 am 
Offline

Joined: Sun Jan 04, 2015 2:49 am
Posts: 7
Hi BigEd, yeah no luck with strace.
For Mario's original GUI I get nothing
For rpress's I get the same core dump
Nothing in the leading up strace gives much hints

Thanks thou


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 05, 2015 12:09 pm 
Offline

Joined: Sun Jan 04, 2015 2:49 am
Posts: 7
OK.. progress .. I think :wink:

I found this fork on git hub :
https://github.com/pda/pda6502/tree/master/tools

Seems someone updated the python scrip for v3.

I also feel I had an issue with my breadboard!!! .. sigh

I think I can write to the EEPROM now :
Code:
$ ./meeprommer3.py -c /dev/ttyUSB0  -p 64 -w -f /tmp/test.hex
Writing from 0000 to 03ff
Writing from 0400 to 07ff
Writing from 0800 to 0bff
Writing from 0c00 to 0fff
Writing from 1000 to 13ff
Writing from 1400 to 17ff
Writing from 1800 to 1bff
Writing from 1c00 to 1fff
Wrote 8192 bytes in 47.78 seconds


Thou now when I go to read the data it looks bad. I just get lines of "37"
Code:
$ ./meeprommer3.py -c /dev/ttyUSB0  -p 64 -r
0x0020 : 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
0x0030 : 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
0x0040 : 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
--snip--
0x1FE0 : 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
0x1FF0 : 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37


not sure why i would get that when I read the EEPROM... the file i am writing is not just filled with "37".

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 06, 2015 2:29 pm 
Offline

Joined: Sun Jan 04, 2015 2:49 am
Posts: 7
OK.
It works...

It seems the power from Arduino Nano would drop to 3.8v on writes. EEPROM would then disable writes.

Used an external power supply works fine :
Code:
$ ./meeprommer3.py -c /dev/ttyUSB0 -W -a 0x0000  -p 64  -f /tmp/test.hex
Writing from 0000 to 03ff
Writing from 0400 to 07ff
Writing from 0800 to 0bff
Writing from 0c00 to 0fff
Writing from 1000 to 13ff
Writing from 1400 to 17ff
Writing from 1800 to 1bff
Writing from 1c00 to 1fff
Wrote 8192 bytes in 1.85 seconds
$ ./meeprommer3.py -c /dev/ttyUSB0 -v -f /tmp/test.hex
Verifying...
Ok
$


Well at least I hope the Verify function works :D


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 12:49 am 
Offline

Joined: Tue Feb 17, 2015 12:36 am
Posts: 7
Location: CA
Hi guys,

I just registered to the forum for this project. I am planning on making a z80 computer and was looking at possible eeproms. One of which was the AT28C256. In my quest to find a cheap flasher I managed to stumble upon this wonderful thread. Unfortunately UnaClocker's tindie page has been discontinued and I'm not sure how to contact him. Hopefully some people here can help me get this setup. I have a few questions as I am more of a software than hardware guy and am trying to dabble in the world of EE.

I got a breadboard and will pick up an Arduino Uno soon. I found the schematics on the page and turned them into gerber files so that way I can get a few pcb's produced. In the BOM C1 does not have a listed value - is there a general size I should get? Additionally I can't seem to find an IC1/memory, is that just the placeholder ZIF where I would add my 28C? I don't care about flashing some of the other chips that require the charge pumps, so is it possible to leave out some of the chips or to simple use a V1 pcb with the new software? Finally, is there an alternative to the 8bit shifters? They are $10 a pop and currently half of the cost (along with the arduino).

Thanks.

_________________
Trying to build a z80 HBC.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 1:04 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
I used Mario's design that uses the Arduino, some output shift registers, some decoupling capacitors, and a ZIF socket. I built it on a breadboard first, then transferred it to some proto board. Ugly, but faster turnaround time for a one off than making a PCB. Here's a video of the first draft.

http://youtu.be/XnTPDfEHkMU

The 595 shift registers were off eBay and I got 5 for around $5, the breadboard Arduino was about $13, and the ZIF socket was close to $10. The decoupling capacitors are usually 0.1 uF and are less than a dime each. So my total was less than $30 and a few hours of noodling with a soldering iron which I consider fun.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 1:29 am 
Offline

Joined: Tue Feb 17, 2015 12:36 am
Posts: 7
Location: CA
Thanks Martin. I would agree that a one off pcb is wasteful especially with many companies having a 5/10 board MOQ.

I remember looking at http://www.ichbinzustaendig.de/dev/meeprommer-en but thought that most of the information their was outdated. Regardless the 74HC595 shift registers mentioned in the schematic are 10 times cheaper than the 74LS595D in UnaClocker's V2 BOM.

So I assume I can put all that on a breadboard like you did and then use some jumper wires to hook it up to equivalent slots on an arduino uno instead of the nano? I am running Linux so I probably won't use your windows port. If the design still works with rpress's newer and faster firmware that would be awesome, but using mkeller's older code isn't the end of the world.

Edit: Is there a reason that the cheapest zif socket I can find on mouser is $10, but I can find $3 ones with sparkfun, adafruit, etc? ex: https://www.sparkfun.com/products/9175

_________________
Trying to build a z80 HBC.


Last edited by Smasher816 on Tue Feb 17, 2015 2:59 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 2:19 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
An Arduino Uno will work fine. The ZIF socket you linked to is a 28 pins, but too narrow for EEPROMs which use a socket twice as wide. I imagine the price difference is because the narrow size fits an AVR 328p which means they'll sell a lot more of them, so economics of scale kicks in.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 3:06 am 
Offline

Joined: Tue Feb 17, 2015 12:36 am
Posts: 7
Location: CA
Martin_H wrote:
The ZIF socket you linked to is a 28 pins, but too narrow for EEPROMs which use a socket twice as wide.

Thanks, I actually found another one that is .6" instead of .3", so I guess that will work. If anyone is interested here it is - https://www.sparkfun.com/products/9176. It is still much cheaper than mouser. I think I will probably grab the arduino, socket, and everything else from there.

I think I will go ahead and buy all the parts for the schematic you used on your breadboard. It would be nice to confirm that it would work with the newer software but I assume it will. I think that the v1 pcb is pretty much the same thing as the breadboard, and then all the extra stuff on v2 isn't necessary and just extends support to more chips.

If there is nothing else pending I'll place the order soon and post my progress or issues here. Thanks for the guidance. :)

_________________
Trying to build a z80 HBC.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 3:43 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
You should be good to go with that ZIF socket. Don't hesitate to ask questions here if you get stuck. Although you're building a Z80 machine, programming the EEPROM is the same so we can help.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 5:21 am 
Offline

Joined: Sun Jan 04, 2015 2:49 am
Posts: 7
Smasher816 wrote:
Thanks Martin. I would agree that a one off pcb is wasteful especially with many companies having a 5/10 board MOQ.

I remember looking at http://www.ichbinzustaendig.de/dev/meeprommer-en but thought that most of the information their was outdated. Regardless the 74HC595 shift registers mentioned in the schematic are 10 times cheaper than the 74LS595D in UnaClocker's V2 BOM.

So I assume I can put all that on a breadboard like you did and then use some jumper wires to hook it up to equivalent slots on an arduino uno instead of the nano? I am running Linux so I probably won't use your windows port. If the design still works with rpress's newer and faster firmware that would be awesome, but using mkeller's older code isn't the end of the world.

Edit: Is there a reason that the cheapest zif socket I can find on mouser is $10, but I can find $3 ones with sparkfun, adafruit, etc? ex: https://www.sparkfun.com/products/9175



I used the v1 BOM and schematics with the 74HC595.
Programming AT28C256's. I have no other EEPROM's to test
I have had no issues writing/reading EEPROM's from the command line (via python)
I've put all the F/W and python code up on my git-hub page up if your interested.

I did have this wired on a breadboard but I've now soldered it to a though-hole PCB, working fine and much more stable.
I noticed sometimes the ZIF socket would come out of the breadboard a little...

I am too on my way to building a Z80 :)


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 17, 2015 7:11 pm 
Offline

Joined: Fri Dec 06, 2013 7:49 am
Posts: 8
Nice to see that people are still working on this. I'm starting to pick this project up again; I'm making a simpler (?) design with an MCP23008 I/O expander for the data bus, an MCP23017 I/O expander for the address bus and Arduino digital pins for the control logic. I'm playing around with the MCP23008, and I think my earlier problems was due to that I didn't reset the I/O expander properly. I did an Arduino sketch today where I tied the reset pin to a digital pin (and toggled it on each start), and using my multimeter I could now see that the GPIO pins on the I/O expander did what I expected.

I had a logic probe that I bought on eBay which was very useful, but now it seems that it's broken :-(

_________________
Aspiring homebrew- and replica builder.
Blog http://tobier.se
Hackaday http://hackaday.io/tobier


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 18, 2015 12:15 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
I use an LED with a 330 ohm resistor, and my DMM as a logic probe. They're not fancy, but it gets the job done.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 21, 2015 6:10 am 
Offline

Joined: Tue Feb 17, 2015 12:36 am
Posts: 7
Location: CA
It works! http://i.imgur.com/yMRQKTD.jpg (I tried embedding the image but it was way too large)

Both the java programs (mkller/rpress) would not compile due to various gui items not existing. Googling wasn't much help. I tried the python program but it had issues saying the ack wasn't received. Playing around in the serial console I figured out that it sent the '%' fine, but the python program didn't recognize it. I guess the library changed and now it returns a byte array so you have to check the first byte not the whole thing. Then the arduino would get stuck in an infinite loop on receiving the data (even though I was sending more than enough bytes). I think it overflowed causing the data to be overwritten/lost before the program could read it, resulting in it not finding enough content. Replaced the loop with a Serial.readBytes and that worked. Then I hooked up some leds to the shift registers and confirmed they incremented correctly after a little fiddling around. Yet it was still not working. I cut up a USB cable, pluged it into a phone charger and used the 5v/ground lines on the bread board with Vin to the arduino (I heard the arduino could sometimes droop the charge over usb) - still no use. Figured out I had my address lines incorrect since the data sheet started at A0, meaning that A14 is a total of 15 lines (not 14 like I originally assumed). Still wasn't working - lifted up the zif and saw I had everything a pin too far to the left. Fixed all that and now it finally works! It's been a long few hours of debugging but I'm glad it works :)

Hopefully seeing all the problems I hit can help anyone else who tries this and has an issue. it's always good to have ideas for where to look. I can upload the shift register test if anyone thinks it would be useful...

_________________
Trying to build a z80 HBC.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 21, 2015 8:19 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10981
Location: England
(Let's test this - I'm pretty sure that if you attach a large image, but choose not to use the 'place inline' feature, it won't supersize itself. It's much better to get the image onto this site, because in the past useful images in posts have disappeared when the image hoster makes changes, or goes bust.)


Attachments:
File comment: testing a non-inline attachment
yMRQKTD.jpg
yMRQKTD.jpg [ 2.19 MiB | Viewed 1033 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 269 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 18  Next

All times are UTC


Who is online

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