Saturday, May 4, 2013

Arduino IDE OPEN/SAVE problem in Ubuntu


Finally, Arduino UNO has arrived. I've downloaded IDE tool and tested some examples. But a serious problem appeared that gave me a headache! Open and Save feature stops with a Java NullPointer Exception!!!


Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: NullPointerException
at sun.awt.motif.MFileDialogPeer.setFont(Native Method)
at sun.awt.motif.MComponentPeer.initialize(MComponentPeer.java:182)
at sun.awt.motif.MComponentPeer.init(MComponentPeer.java:226)
at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:103)
at sun.awt.motif.MDialogPeer.<init>(MDialogPeer.java:39)
at sun.awt.motif.MFileDialogPeer.<init>(MFileDialogPeer.java:24)
at sun.awt.motif.MToolkit.createFileDialog(MToolkit.java:263)
at java.awt.FileDialog.addNotify(FileDialog.java:265)
at java.awt.Dialog.conditionalShow(Dialog.java:887)
at java.awt.Dialog.show(Dialog.java:1035)
at java.awt.Component.show(Component.java:1584)
at java.awt.Component.setVisible(Component.java:1536)
at java.awt.Window.setVisible(Window.java:842)
at java.awt.Dialog.setVisible(Dialog.java:986)
at processing.app.Base.handleOpenPrompt(Base.java:649)
at processing.app.Base$3.actionPerformed(Base.java:906)



There was no answer even after some google searches. I was so disapointed that I setup Eclipse with AVR plugin to do my experiments. Examining the "AWT-EventQueue-0" error I looked for some environmental set relevant to AWT. I found that there was an AWT_TOOLKIT set. Unsetting this solved the problem!!!


$unset AWT_TOOLKIT
$arduino


Wednesday, May 1, 2013

Programmer for Atmel mCs

Waiting for my Arduino Uno to arrive, I had time to dig for an old project of mine, a mini-computer based on Atmel's 8252 microcontroller. I used LPT Paraller Port of my PC to flash the mC. For that purpose I wrote a cool application, called "LPT_Programmer". 
The schematic diagram for the Programmer Cable is shown below. It uses the SCK, MISO, MOSI and SS pins to flash the mC according to the technical datasheet.




The application can Download or Erase the Flash, read EPROM and Reset the mCu. The is also a Device Setup Feature and a communication Settings dialog box.


The application will be available to download very soon!