Jeffrey's Log

Archives | Subscribe


Older posts

ATMEGA32U2 board using gEDA

       

Two years before I had designed a mini development board for AT90USB162. There was a small mistake in that board. It didn’t have the 1MFD capacitor connected across the UCAP (PIN 27) and ground. Because of that the board was not detected while connected via USB. Last month I thought of repairing that board and do some USB projects. I ordered samples of ATMEGA32U2 from ATMEL. Thanks ATMEL for the samples.

Today I did a small hacking on the board. I added the capacitor as needed by USB. Now the board is working fine. There came the next problem. GCC-AVR version which I had, didn’t support ATMEGA32U2. Also for loading the hex into the controller, I used the dfu-programmer. Since I had installed it from the Ubuntu repository, dfu-programmer was of older version and it also didn’t support ATMEGA32U2.

After a few Google search, I found that if you compile for AT90USB162, the hex generated is supported by ATMEGA32U2. So I wrote the C code and compiled it for AT90USB162. Next task was to make the dfu-programmer to work. The only solution was to get the latest code and compile it. Below shown is the way to compile the dfu-programmer from source

$ mkdir dfu-programmer
$ svn co https://dfu-programmer.svn.sourceforge.net/svnroot/dfu-programmer/trunk/ dfu-programmer
$ cd dfu-programmer/dfu-programmer
$ ./bootstrap.sh
$ ./configure
$ make

Once installed, flashing the controller is very easy. First we have to bring the controller into USB bootloader mode. For that first press and hold the RESET button. Then press and hold the HWB button. Now release the RESET button and then release the HWB button. This will bring the controller into USB bootloader mode. Now we can issue the following instructions to flash the controller.

$ dfu-programmer atmega32u2 erase
$ dfu-programmer atmega32u2 flash blink.hex
$ dfu-programmer atmega32u2 reset

This is an Open Hardware project and I will soon post the schematic and PCB layout once adding the missing capacitor in the old design. Below shown is the snap shot of the board.
ATMEGA32U2 gEDA PCB

Posted in: Circuit, Electronics, open hardware, tutorials | Tagged under: , , | 4 Comments

LPC2148 (ARM 7) Test bench setup

       

This is my LPC2148 (ARM 7) test bench setup.

The LPC2148 header board was bought from Rhydo Labz. You cannot directly power up and start to use. It lacks communication interface. To flash the controller, you need a serial port or a JTAG port. Since this board doesn’t have these port connectors, you need to solder them. So it might be hard for a newbie.


Instead of this board, you can try the BlueBoard which has all the port connectors. I will recommend this for a newbie. I hope that board is worth for its price.

The next thing which you need is a power supply to power the board. You can build your own power supply (If someone needs to know how to build a power supply, I will write a tutorial. But please put a comment in this post saying that you need the tutorial.) ,or you can buy 5V DC power supply (adapters).

Once the board is powered up, it can start to execute your code in its memory. But a fresh controller wont be having any code in its memory to execute. You need a programmer to load the code into its memory. But the LPC series controllers have built-in serial boot-loaders. These boot-loaders can get the code from the serial port and write into its flash memory. So you don’t need a programmer.

To program the controller using the serial boot-loader, you just need to connect the controller to the host PC and the host PC needs to run a serial programmer software. You can get a lot of serial programmer software for LPC controllers. Some of them are

So thats all. Power up the board and connect the serial port to the controller. Run the serial programmer software in the PC. You controller will execute the code flashed into its memory.

But wait. From where you can get the hex file to flash into its memory? Its simple. You just need a cross-compiler. To the cross-compiler, you just need to feed your C source file. It will compile and give you *.out files, which later can be converted into *.hex files.

I will soon try to post a wiki page about how to compile and flash the code into the memory.

Posted in: Circuit, Electronics, Embedded Linux, GNU/Linux, Hacking, open hardware, Projects, tutorials | Tagged under: , , , , , | 4 Comments

Link Pad

       

Some useful links ;)

1) Introduction to Robotics (Free Course from MIT)

This is a free course about Robotics from MIT. This course gives a small introduction to robotics. Course is made for intermediate users(Not that simple to understand if you don’t know mathematics). You can find more such free courses from MIT in MIT OCW.

2) Linux Device Drivers

Learn about Linux Device Driver

3) ARM Projects

Some ARM projects
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/
http://www.open-research.org.uk/ARMuC/

4) Learn Git

Know some basics about Git which will become useful in future.

Posted in: Electronics, Embedded Linux, Mathematics, Open Course, Robots, tutorials | Tagged under: , , , | Leave a comment

Current Sinking & Current Sourcing Tutorials

       

I have seen some web pages defining that current sinking and current sourcing are same. But the truth is that they are different. This is a tutorial about current sinking and current sourcing in Integrated Circuits(IC).

Current Sinking & Current Sourcing Tutorials

Posted in: Circuit, Electronics, tutorials | Tagged under: , , | Leave a comment

More Octave Example Programs

       

More example programs for Octave has been posted in my wiki page. Please vist

MoreĀ  Octave Examples

If you don’t know about Octave, I have been maintaining a wiki page for Octave. See the link below

http://jeffrey.co.in/wiki/doku.php/experiments_using_octave_for_b-tech_course

Posted in: Electronics, FOSS, GNU/Linux, Mathematics, Open Course, tutorials | Tagged under: , , , | Leave a comment

Older posts