DIY Avr Parallel port programmer

parallel

There are several ways to wire the parallel port when you make a parallel port programmer.Am using the programmer in Linux along with avr-gcc and avrdude. Am using Atmega8 uc.

First install necessary development tools

sudo  apt-get install gcc-avr avr-libc gdb-avr avrdude

Now we need to create a cable to go between the LPT port on your PC and the AVR micro-controller

DB25 Male AVR
Pin 1 SCK
Pin 2 MOSI
Pin 11 MISO
Pin 16 RESET
Pin 21 GND

In all  variations of the the programmer, pins 18-25 are ground pins., bent these pins at right angles and soldered them all together.The data pins (1,2) should have a 1k or 330 ohms resistor in line, this is to stop you from killing either your LPT port, AVR, or both.

Now the Hardware Part connect the wires from parallel port exactly as given below.

AVR

For testing no need on crystal etc..Give 5v Vcc to Pin 7 and GND to pin 8.Now issue this command on terminal

sudo avrdude -p m8 -P /dev/parport0 -c dapa

you should receive this…

avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9307
avrdude: safemode: Fuses OK
avrdude done.  Thank you.

If you receive

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

Crosscheck your connections the programmer is not identifying the controller

Screenshot from 2013-07-07 14_36_02

Happy Hacking 🙂

Advertisements

Connect Mobile broadband using pppconfig

Her am trying to connect a docomo EVDO Install pppconfig first.

sudo apt-get install pppconfig

Then issue this command

sudo pppconfig docomo

 

select “Create a Connection named docomo” and select “Ok”

1

select “Dynamic DNS” and select “Ok”

2

select “PAP” and select “Ok”

3

give username as “Internet” and select “Ok”

4

give password as “Internet” and select “Ok”

5

pppconfig will give speed of your modem as 115200, use this default

6

Select “Tone” and select “Ok”

7

give phone number as #777

8

Next step will be giving the modem name, I’m going to use /dev/ttyUSB0

9

Finally select “Finished Write files and return to main menu”, two files will be created, only will be ‘/etc/ppp/peers/docomo’ and another one is ‘/etc/chatscripts/docomo’
select “Quit”

10

 

 

Now to connect try these commands

pon docomo

it will start pppd and try to connect, but it will not throw any information in your terminal, you need to watch the activities through ‘tail -f /var/log/syslog’. If everything goes fine, it will establish ppp connection to Docomo.

To stop the pppd  connection

poff docomo

 

Happy Hacking 🙂