AVR made uber EASY!
codeviper
Posts: 208
things needed
`1 parallel port
4 220 ohm resistors
4 wires
db25 connector
arvdude
avrdude GUI
one AVR close to one used on the arduino boards (atmega8 16 32 64 are all good)
google BSD programmer schematics
construct the BSD programmer
download Arduino compiler
search your C drive for compiled files (name of file).cpp.hex (example BLINK will compile to BLINK.cpp.hex
you may need to enable search to look in hidden files and folders
upload program using AVRdude GUI unselect to write or read fuses if you are uncertain of setings, as an AVR will run just fine as is, but will be froze if you pick a bad setting and will be briked if you dont have a high voltage programmer.
if you do want to set the fuses use the AVR fuse calculators you can find via google.
i have loaded arduino compiled code to Atmega48v-10pu chips like this and it is super easy.
i had to do something while i wait to buy new props lol
and i just thought id share what i have found to be dead simplest way to get an AVR chip going
no make files no complex command line options
and best of all
almost as easy as a prop to program
why do i want avr's?
1 avr = 6 ADCs and another cpu to pre-process analog data and other stuff for anywhere from $1 and up
but an ADC is from like $3 and up and the prop has to work some
if i can use an AVR to prescale the analog and plus maybe do some math for the prop i say SWEET.
`1 parallel port
4 220 ohm resistors
4 wires
db25 connector
arvdude
avrdude GUI
one AVR close to one used on the arduino boards (atmega8 16 32 64 are all good)
google BSD programmer schematics
construct the BSD programmer
download Arduino compiler
search your C drive for compiled files (name of file).cpp.hex (example BLINK will compile to BLINK.cpp.hex
you may need to enable search to look in hidden files and folders
upload program using AVRdude GUI unselect to write or read fuses if you are uncertain of setings, as an AVR will run just fine as is, but will be froze if you pick a bad setting and will be briked if you dont have a high voltage programmer.
if you do want to set the fuses use the AVR fuse calculators you can find via google.
i have loaded arduino compiled code to Atmega48v-10pu chips like this and it is super easy.
i had to do something while i wait to buy new props lol
and i just thought id share what i have found to be dead simplest way to get an AVR chip going
no make files no complex command line options
and best of all
almost as easy as a prop to program
why do i want avr's?
1 avr = 6 ADCs and another cpu to pre-process analog data and other stuff for anywhere from $1 and up
but an ADC is from like $3 and up and the prop has to work some
if i can use an AVR to prescale the analog and plus maybe do some math for the prop i say SWEET.
Comments
Looks like a fun adventure if you're properly equipped!
Parallel data is my freind
serial is good to send data
but give me a good old LPT port anyday ^,^
get one, use one, forever parallel, viva la parallel
You're preaching to the choir around here.
I've used an AVR Dragon on the few AVR projects I've had. I thought it worked well.
Leon had sugguested it. (Thanks Leon.)
I use AVR Studio to write the programs (I think Leon suggested this too). I think it works fine.
I suppose you method is probably less expensive.
plus, i just ordered my new PROPs and 4 AVRs one ATMEGA48 will get a firmware to emulate rs232 via USB so i can just run the ATMEGA at 3.3volts and its IO pins should put out rs232 at 3.3 volt logic allowing me to program the props VIA USB cheap yup im a :nerd: to be so excited over this, but i figure im in good company. lol
what do you think? i can program VIA 3.3 volt rs232 directly just like i can program using my serial to PROP right?
lol.... yup that is my war-cry for the good old LPT port i wish they will migrate it to the MOBOS and give us an option to get a DB25 connector if we want to, id put my LPT port on the front.
the computer i use to program MCUs is facing backward the CD and buttons are sitting on top facing to me and well i have decked it out with a few goodies.
there is something great about having those options to prototype new stuff. after all if you make a devive that just needs to get and send data you can later on add a chip to make it a USB device.
i got to thinking id like to see an AVRstamp wouldn't that be cool?
What is funny is that lately I've been using the Basic Stamp a lot. I mostly just read sensors and pulse servos and it works well for that. Plus I've been giving my son programming lessons and PBASIC syntax is easier than C syntax. Although I may need to use a Propeller or AVR as a GPS preprocessor given the Stamps memory constraints.
now next step when i get my new PROPS and some AVRs in the mail
i will load one AVR with the USB to RS232 CDC drivers matching the ones on the arduino, then connect the RX/TX lines to the PROP and i should get android to talk to the PROP via USB host!
and the best part is i did this with the android scripting enviroment! and the LUA scripting! so i can write scripts right on the android device to talk to the prop device!
is this new or am i reinventing the wheel?
They make a nice peripheral chip to the prop.
This sounds like an excellent approach to the Prop-Android link problem. Are you reinventing the wheel? Well, over a year ago I posted the "Android-android" thread here fishing for ideas on how to do this. There were many suggestions forthcoming including the use of Bluetooth, WIFI and so on. Then we have the USB host software for the Prop but that takes a lot of resources.
So it looks like you have a sound, small, cheap new idea for this and I look forward to your writing up the results.
here is what i did.
Supplies
wonder media 8650 tablet with host USB
Z4root (i used the temporary root to avoid voiding the warranty)
android serial api demo program (it includes the feature to show you available serial devices and a terminal)
ASE android scripting environment ( i downloaded and used the LUA plugin)
STEPS
first i uploaded to the arduino a demo that used the serial output via the onboard usb to serial chip wich is also just an atmega16u
then i connected the arduino to the tablet turned on the tablet
i used Z4Root
i started the serial SPI demo
i used the config and found a "dev/ttyACM0" device and also set it at the right baud
i used the terminal to check if it worked, and got the values for the POTs i had connected to the arduino.
then i used LUA in ASE and followed a tutorial on using SERIAL PORTS in linux with LUA
i ran a short program that just looped reading the serial data and printing it to the screen.
ASE gives use of android APIs so there is the possible future of talking to your Prop bots or i like the ideal of Props turning on and of lights with voice commands.
if this helps anyone that will be great.
i just got more props and atmegas but i had to return the tablet it was just $50 dollars but a bad internet connection and an unreliable SD card are to big to ignore.
So the trick here is in finding a Android devices with USB Host Mode.
Sadly that rules out my Galaxy phone. Still that's expensive and always in use as a phone.
Now the question might be why do we need the atmega? A proppug would do. Although I guess the atmega solution might be cheaper or easier to build on board.
google it cause tons of the small mini ports can do it with an adapter.
yes, but does the android drivers recognize this chip as a normal device?
personally I don't want to write my own driver for one chip when another chip will work with current drivers.
there are also 40pin AVRs with good IO that support the CDC usb drivers that should work to.