6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 3:48 am

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Tue Jun 10, 2014 12:43 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
You can check out the Arduino based Programmer that is really simple to build if you use the Shield-based solution.
You only have to make the PCB (Eagle files are provided), Upload the Firmware and run the Java-Client.

There's an english version of the website at: http://www.ichbinzustaendig.de/dev/meeprommer-en

It works good for 28C64 and 28C256 EEPROMS.

The latest version of the Software can be found on github:

https://github.com/mkeller0815/MEEPROMMER

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 12, 2014 2:00 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Hi Mario, I was able to breadboard your programmer, and download the sketch onto my Arduino compatible. I'm trying to get the MEEPROMMER running using the command line:

"C:\Program Files\Java\jdk1.7.0_51\bin\java.exe" -jar MEEPROMMER.jar

But that gets an exception:

Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
at SimpleJBurn.SimpleJBurn.main(SimpleJBurn.java:17)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Group
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 1 more

That's a Swing class which is supposed to be include in Java, so I'm a bit confused. Are there any gotchas you know about getting the client side software to run? I already downloaded and installed libRXT.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 12, 2014 12:58 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
You need the file "swing-layout-1.0.4.jar". (Can be downloaded from the net) and place it in a directory called "lib" beside the MEEPROMMER.jar.
Sorry I have to update the github and the documentation for that.
The library was introduced while I added the progressbar the changes during the read and write process.

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 12, 2014 4:22 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Thanks, I figured it was something simple. I'll try it tonight.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 13, 2014 2:21 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Good news, bad news, good news.

The Good news is that I can get JBurn to run now that I have the correct jar in place.

The bad news is that I can't get it to read or write from the Arduino.

The good news is that if I use the Arduino serial monitor and hand type in commands I get the expected output. Here are some examples:

Code:
V
MEEPROMMER $Revision: 1.2 $ $Date: 2013/05/05 11:01:54 $, CMD:R,r,w,W,V

R,0000,0010
0x0000 : FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

w,0000,0002,02

R,0000,0010
0x0000 : 33 33 FF FF FF FF FF FF FF FF FF FF FF FF FF FF


So reading and writing to the EEPROM is working, it's JBurn that can't access the serial port. I installed libRXTX according the the instructions, but obviously something is wrong. It is able to identify COM4 as the port the Arduino is bound to, so it isn't completely broken. It's just not working either. Here's the output of the version command, and an attempt to read:

Code:
Simple JBurn - Revision : $Revision: 1.5 $, $Date: 2013/07/19 05:44:46 $
Error: Not connected to any Programmer!
Error: null
8192 bytes read in 0.0 seconds


Update: it occurred to me overnight that I'm using a USB to Serial cable. While it works for my other uses the timing can be a smidgen different. I probably need to fire up Eclipse and debug this one. Conversely I could port to Processing which I've used with the serial port.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 13, 2014 11:53 am 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Hmm, strange. What OS are you using? Under OS X there was a problem setting the correct access rights to a lock-file the grants exclusive access to the serial port. But I think you are using Windows. Is the baudrate in the firmware and the Java Application?

Currently it is set to
int serialSpeed = 115200
in MainFrame.java.
But if you got an older version of the binary, it could also be set to 57600.
Baudrate for firmware and Java Client have to be at the same value.

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 13, 2014 1:40 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
I'm using Windows and downloaded the jar from your GitHub that was the most recent. With Windows the application sets the baud rate and the source code has the value you mention.

Native method calls are always twitchy in Java. It's probably not your app, but the underlying libRXTX. Hard to say without debugging the whole mess. It has to be finding the jar because I'm not seeing any class not found exception, it's just not working.

I think I'm close on this one, but I won't have time to dig deeply into it until Sunday night.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 14, 2014 4:34 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
I decided to stay up late and debug this one. It turns out that the call to list serial ports works, but the first write to the serial port hangs the port. I reinstalled libRXTX very carefully, but no change in behavior.

What's odd is that the Arduino IDE comes bundled with its own version of this library, and it is working to upload sketches and monitoring serial output. In reading the Arduino is the 32 bit JVM, so this might go away if I use that JVM.

The bottom line is that this looks like a 64 bit Windows 7 coupled with a 64 bit JVM problem and this specific library.

Update: I replaced all the cabling and had the same problem.

Update: I downloaded the 32 bit JDK and libRXTX and it resulted in the same error. But I can read and write to the port from the Arduino serial monitor. I've concluded there's some problem with the Java client on Windows and I'm probably spinning my wheels. I'l switch to Python and see if that works any better.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 16, 2014 12:40 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Hmm, I have no Windows machine to test. Especially no 64 bit system. The last windows I had to use was XP some years ago.
Maybe you go with the following version of RXTX:
http://mfizz.com/oss/rxtx-for-java

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 16, 2014 1:25 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Thanks for the pointer to the 64 bit version of libRXTX. I hadn't found that on my own and it might help. I'll try it tonight.

BTW Thanks for your circuit design and firmware. I'm sure I'll eventually find a solution to the GUI serial port problem. The worst case scenario is installing a Linux partition to get components that play nicely together.

What's surprises me is Sun/Oracle not including serial port support in the JVM. There are tons of serial protocols that you can't support in Java without writing native method calls or using a freeware serial library. It's a bit of a miss on their part.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 17, 2014 1:50 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Last night I tried the new libRXTX and it didn't work either. It can return a list of serial ports, but any attempt to open and write to a port fails. I'm not sure of the root cause, but I've concluded that any Java client will not work without debugging the internals of libRXTX to see what they're doing wrong.

I have Visual Studio Express on my machine and quickly put together a C# example which sends "V\n" and reads the response. It worked fine just like the Arduino serial monitor or Putty. C# is extremely similar to Java, so I ported three of the four JBurn modules to C#. The Swing stuff requires a re-write to WPF, but that's not hard. So I'm going with C# which includes serial port support in the VM.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 18, 2014 7:39 am 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Having a native Windows client would be a good addition to the project. It would be nice if you share your work an add it to the git repo. Just make a pull request, that I can add.

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 18, 2014 10:48 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Sure thing. I haven't contributed to GitHub before, so I signed up and read the help. I then initiated a pull request, and then forked to my account. I can check in my changes when I'm done and I think you can then pull them back to your repository. Hopefully I have this correct.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 22, 2014 4:47 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Success! I was able to rewrite the Java into C#, program an eeprom, and validate it but dumping the contents and comparing it to the original image file. I had one hardware error (A8 accidentally tied high), a few software errors, and their combination was a bit tricky to debug. The C# serial port model is asynchronous which makes the code structure quite different. But the basic concepts of both programs are the same.

My code is a bit rough still, but I pushed it to my fork of Mario's github repo. I'll probably add more polish to it, but I'd like to try my eeprom in my 6502 SBC. But before I can do that I've got work around the house that isn't going to do itself.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 63 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:  
cron