Introduction: How to Program Arduino Chips Over LPT With C++ Code?

Hi again!
Today i show you how to program Arduino chip(like ATtiny85) with c++ code(aka code in Arduino IDE)
Since you cannot use BSD(aka LPT) programmer with Arduino IDE, i made this tutorital :)
Note: This tutorital depends on my another tutorital(wiring) https://www.instructables.com/id/How-to-program-Attiny8545-with-parralel-port/
N
B! I will assume you use Linux :) Windows one coming soon cuz it's simple(but bit harder from linux)

Step 1: You Will Need...

Arduino IDE: http://arduino.cc/en/main/software
Arduino IDE ATtiny85/45(this tutorital) Support: https://github.com/damellis/attiny.git (git clone)
Linux skills
ofc (su)do

Step 2: So Run Arduino IDE

And select Options -> Board -> (Your board)
Mine option with ATtiny85-20PU: Options -> Board -> ATtiny85 (internal 1 MHz clock)
If code is intended for 8MHz speed, use 8MHz version(if you use it on 1MHz running chip, commands, like sleep will be x8 longer), but you need to change fuse bits
NB! I don't know to change fuse bits, so don't ask me ;)
Type in your code you want, and complie!
Yes it should show errors but ignore them
P.S With some Serial port and settings combinations it will try to use parallel port, but it doesn't know how to use BSD programmer...

Step 3: Do the Magic!

Open up terminal(or File manager) and copy /tmp/build[RANDOM NUMBER].tmp to somewhere(like homedir)
Now open Terminal and cd to that folder you copyed
Type to there:
$ sudo avrdude -p (board) -P /dev/parport0 -c bsd -U flash:w:[hexfile].hex
AND ENJOY! :3
Note: on this sample, there is no .hex file, cuz i entered to sketch "blah blah blah" :)

Comments

About This Instructable

3,318views

19favorites

License:

Bio: Linux enthusiast Current Instructables are 4-5 years old, I'd rather delete them because of my inconvenient text. ~sigh
More by mikroskeem:How to move Raspberry Pi rootfs to another drive/partition?How to program ATtiny85 with Raspberry Pi?How to program Arduino chips over LPT with c++ code?
Add instructable to: