Domain: avrfreaks.net
Stories and comments across the archive that link to avrfreaks.net.
Comments · 21
-
A few books to try
I'm really enjoying the testbook for the VHDL/FPGA RTL design class I'm taking now. RTL Hardware Design Using VHDL: Coding for Efficiency, Portability, and Scalability by Pong Chu. It doesn't bog down talking about all possibilities the language allows for legal syntax. The author really seems to focus on common practice for coding into a chip. There's very little if any testbench/simulation in this book, so look elsewhere for that, this one is all about the circuit design. Rather than only explaining what an FSM is, or just that you need a combination of registers and combinational logic, it gives some good suggestion on how to organize your code, such as using two or three separate processes rather than a single one. It talks about coding styles to minimize logic stages for some types of circuits. And it's the first one to explain why getting latches in synthesis is "bad" in a way I could understand, where other books just seem to say "don't allow latches" and I didn't understand why. I find this very refreshing now, as my first exposure to VHDL back in the mod 1990's had a terrible textbook that left me horribly confused about how to do anything useful with the language. And that was very frustrating as I was very interested in FPGAs, and there was no Verilog course at my university. After working with Verilog for the past few years at work, Chu's VHDL textbook has made it a lot easier for me to see how to create Verilog as well, rather than just read to understand other people's code. Chu has some other books that come in VHDL and Verilog pairs. They have project examples to play with in an inexpensive FPGA board. Check them out too.
For firmware and coding hardware, look for books on Embedded style programming, and about driver development. Look up some programmer guides for some ARM chips, they will tell you register definitions and fields and such to program to. I don't know how good these will be, but on my todo list are "Essential Linux Device Driver", "Linux Device Drivers, 3rd Edition", and "Hardware/Firmware Interface Design: Best Practices for Improving Embedded Systems Development". I looked at "Atmel AVR Microcontroller Primer: Programming and Interfacing (Synthesis Lectures on Digital Circuits and Systems) " which may be a good example of some of this as well, and check out some Arduino project books, that seems likely to talk about some of this stuff as well. A reviewer of one of the many AVR books says to go look up the http://www.avrfreaks.net/ website for some free such info. They and similar sites for Pic and Arm should have some relevant information for you. If these all seem too much of the "this is the language" or "this is what the hardware looks like" but not enough of "common practice is to..." type, maybe get a kickstarter project going to make what you need, and start interviewing people that do this every day.
-
Atmel SDK
Forget the EEPROM. The concept of programming a ROM seperately from a chip is so 1970's.
Get a programmer that programs chips with on-chip flash.
I'm biased in favor of Atmel's AVR architecture. http://www.avrbeginners.net/ http://www.avrfreaks.net./
You need to decide: will you go with dated (but doable) through-hole technology, or will you go surface mount (SMT) which is more modern, but more difficult to solder. That will impact what kind of programmer you need. Atmel AVRs can be programmed in-curcuit with a cheap dongle.
I don't always design in-circuit programming, debugging, and emulation into my circuits, so I keep a few of Atmel's AVR boards around. The STK500 is awesome: http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2735
$82.16 at Digikey: http://search.digikey.com/us/en/cat/programmers-development-systems/general-embedded-dev-boards-and-kits-mcu-dsp-fpga-cpld/2621773?k=stk500
You can get samples of the AVR Microcontrollers from Atmel's distributors, or they are available at many resellers, including DigiKey. Search for "atmega" and limt yourself to DIP packages.
-
Re:Honest question:
You're confusing Arduino with AVR. AVR is the actual microcontroller and they sell in much larger numbers. Arduino is a development platform in which the AVR fits.In other words, Arduino is a subset of the total AVR market, which in turn is a subset of the total microcontroller market.
Arduino is targeting the hobbyist who would rather write three lines of C code rather than fifty lines of assembly. They are two entirely different groups; though clearly there is some overlap.
For the Arduino group, you go here.
For more general purpose AVR use, including some Arduino use, go here. -
Re:Forrest Mims
Forgot to mention:
here's the site for the avr-libc (erm.. as stdlib is to gcc, this is to avr-gcc).
linkBunch of examples about how to use the library for ADC, UART, STDIO, SPI, I2C, standard LCD displays, etc.
AVRfreaks is a great resource too, forums, plenty of projects posted, AVR chip comparison area, etc.
-
Don't expect chips in a hurry
Atmel makes some great microcontrollers, but their recent record of delivery is very poor and it has hurt their reputation. In particular, Atmel announced the XMEGA range of AVR micros years ago, but they repeatedly failed to become available: see AvrFreaks for just one of many discussions on the topic. A limit subset of the range is just becoming readily purchaseable now.
There are various theories about why Atmel has had such delays in producing the XMEGAs: upper management turmoil, the distraction of a takeover attempt by Microchip, the change to being fab-less, and serious bugs in the early XMEGA production efforts.
I hope I'm wrong, but I wouldn't be too surprised if these new chips aren't physically available for a long time.
-
I'm teaching a few robotics classes...
The http://www.arrickrobotics.com/ A-Robot is an excellent beginner's bot. It is rugged (can survive 10 years in a drawer and still function) gets you up and running quickly, and is expandable. A 12V, 2A power output, 3 spare RC servos, and a 40 pin I/O header (that takes an IDE cable) will let you play with electronics. Roger Arrick wrote "Robots for Dummies" that shows one project at a time how to breadboard a peripheral and code for it. Buy everything that's in the T1 kit, but don't get the BS2 - get the BS2e. $400.
The closest second for a beginner's bot is the BOE bot fromParallax. It's based on the same processor. The problem with the BOE bot is that when it breaks, it's dead. It's not really expandable like the A-Robot is. you would have to see the A-Robot (1 ft x 1ft) next to the BOE Bot (6in x 6in) to understand.
For less beginning, and more electronics, check out http://www.ere.co.th./ You are trading BASIC for assembly, and no longer have a beginner's book to guide you. You do have http://www.avrfreaks.net./ The really cool thing is all the peripherals on 16 pin headers, so you don't have to spend 3 days to get a stepper motor to spin. You will be able to bread-board parts too, with 16-pin headers on the boards.
A close second in this field would be the boards that accept Atmel STK-style headers. That's what I use when I'm not building a custom board. I'm too entrenched in 10 pin headers to go to 16 pin headers, though I made some 10-to-16-pin-adapter-boards.
Finally, you could get an AVR board like I use for my projects from http://www.geocities.com/mengjinsu. Meng's boards are great if you know how to stuff PCBs and solder them. I order them by the dozen. Get the ABR chips from http://www.digikey.com/ and the rest of your stuff from there or http://www.mouser.com./ Also, take a look at http://www.sparkfun.com/
Andy Out!
-
MAKE magazine, LadyAda, EvilMadScientist
Gotta put in a plug for Make magazine, which is a fun read, and full of good projects that anyone can do.
I teach an undergrad course in computer organization (basically beginner architecture), and I've gotten lots of ideas from Lady Ada and Evil Mad Scientist. We use AVR microcontrollers, and the cheap-o USB programmers from Lady Ada, to do a bunch of fun and easy projects.
My kids are 8 and 5, and are playing around a lot with LEDs and magnets. I probably won't let them solder until they're teen-agers (lead in solder sucks, but solder without lead also sucks), but they are getting to breadboard some stuff.
And of course, mentos and coke is always a good idea. -
Re:Practical Electronics for InventorsOh, and there's a F/OSS toolchain for AVR. More info over at AVR Freaks.
Cheers
-
Re:On a somewhat related note
Interesting board. I just picked up an AVR32 based SBC that may interest you also:
http://www.atmel.com/dyn/products/tools_card.asp?t ool_id=4102
Here is a dev kit for the same chip:
http://www.atmel.com/dyn/products/tools_card.asp?t ool_id=3918
It's not an x86 platform, but there is gcc support and it runs linux just fine out of the box.
Check out avrfreaks.net for a great community based on atmel's AVR offerings (from 8bit to 32 bit). What really draws developers in is how great the community is for these devices/chipsets. AVR is definitely a fan favorite. -
Re:The old 8051 learned some new tricks...
I can definitely appreciate the "Single Source" issue... for Christmas, I built a string of RGB Christmas lights. I bought 128 Tiny25s from DigiKey, and basically wiped them out. As of early December, I probably had more Tiny25s in my possession than any other end-user in the world (every light consisted of an RGB LED driven by its own Tiny25)
;-)
I would have liked to have bought a smaller number first to test my design, but I was scared to death that if I didn't buy them all up front, someone else might buy too many and leave me SOL before Christmas. Sadly, I only managed to get about 32 of the light modules to work by Christmas, and the whole network scheme I came up with that worked flawlessly with 3 modules on a breadboard fell flat on its face once I made the modules and wired them up into a single string, so all the lights were able to do on the tree was change colors. In a few months, when I'm no longer burned out of the project (I had no life for most of December), I'll pull out the hot air rework tool and salvage the chips from the nonworking boards and try again (I still have about 200 spare circuit boards) with a different serial scheme (the one I tried was edge-driven. In retrospect, there was probably too much electrical noise on the tree. Next year, I'll just do plain old-fashioned oversampling.)
For pics, check out http://www.avrfreaks.net/index.php?name=PNphpBB2&f ile=viewtopic&t=35933&postdays=0&postorder=asc&sta rt=295 -
Well... I can give you something close
Heheheh... After reading through the instructions I realized what microcontroller it ran on. The microcontroller itself has a very large following. Im sure these people will help you program your little bitty robot. http://www.avrfreaks.net/index.php?POSTNUKESID=17
f 53fb2c3f81f15a81c3e573d6d8bbc -
Re:$10 million and 40kg? Why not $250k and 1kg?
I am a member of a team building a pico satellite at the University of California. The actual price for our entire project hovers around $50,000, of which 40k go to launch costs. This is the price tag for a Russian launch, I am sure the US would charge quite a bit more. The problem with these pico satellites is actually integrating a full fledged OS onto OTS parts. Data memory and program memory are in limited supply, along the lines of KB. We are using an Atmel CPU and are running AVR library from the http://www.avrfreaks.net/ website. The actual module we are writing is for the CPU scheduler. The interupt handler, bus protocols, etc are already written. Running this minimal amount of code is beneficial and doesnt overload the small amount of data memory we can utilize, so basically you can run less than a full on OS like linux and still get away with it.
"What imaging can you do for cheap -- what resolution, what wavelengths?"
The imaging comes down to the type of camera and it's power consumption. Image processing really loads the CPU and draws a lot of power, so compression algorithms are important. JPEG does the job fine, but is limited to around 320x res (in color) given our power constraints. The camera we are using is a CMOS imager, which works through the charging of capacitors relative to the intensity of incoming light. The wavelength of operation ultimately comes down to the FCC. They allocate you a bandwidth to use, most likely 2m or 440MHz. Other functions the satellite may serve is as a HAMsat, or a HAM radio repeater in space. You can tune you radio to the sat freq, and hit any place that the satellite covers with your signal. The preferred mode of operation is digital, so sat comm utilizes packet radio, which loosely resembles the TCP/IP stack. As far as a webserver goes, Im sure you could do it, but it would be limited to the length of one satellite path. Guess thats enough time for a 30 second pr0n clip... -
Re:Next step
I would definitely rate the Atmel AVR series higher than the PICs. They have a more modern architecture internally, and run faster at the same clock speed.
The Atmel ATMega8 is a wonderful beginner's chip. It's cheap at about $5, and it has on-board clock and reset circuits, so you really do only need a 5v supply and some programming hardware. It also has at least one of most of the peripherals available in the AVR architecture: ADC, timers, USART, SPI interface, I2C interface, symmetric digital I/O, watchdog timer, etc. etc.
Oh, and there's the wonderful community website http://www.avrfreaks.net/ where you'll find loads of support, help and ideas. -
Re:Designing Embedded Hardware
I also recommend the "Designing Embedded Hardware" book. Also probably already mentioned: the AVR microcontrollers from Atmel are a good platform to start on (the book above has a chapter on them). A good online resource for AVR is : http://www.avrfreaks.net/
-
If you're an electronics hobbyist...
You can get a small microcontroller (such as an 8-pin AVR AT90S2323) and create a firmware that speaks enough of the PS/2 protocol to be recognized as a keyboard. The parts count should be fairly low, probably just the PS/2 plug, the microcontroller, and a ceramic resonator. The micrcontroller I mentioned has an internal I/O pullups.
You're likely to end up with a spare I/O port on that 8-pin microcontroller, so you could expand the design to include a button that sends ctrl+alt+del (or, for linux, alt+sysrq sequences to unmount and reboot), or an LED caps-lock indicator that you could control from software on the PC. With the AT90S2343 you would get rid of the external clock and get 2 additional I/O ports
Here's an existing project with source (license unclear) that uses AVR and emulates the PS2 keyboard protocol:
http://www.avrfreaks.net/Freaks/freakshow.php?keyw ord_is_id=1&keywords=46
http://members.rogers.com/nlange/avrStuff.html
AVR microcontrollers are great. Few external parts, lots of documentation, develop with the GNU toolchain (including a fairly complete C library), and easy-to-build "SPI" programming hardware -
Re:Tutorials
-
Use a microcontroller
I wouldn't use a laptop, then you have to have a robot big enough to carry it around. You are also pretty much limited to the parallel port for I/O.
Look into microcontrollers (the most common are the Microchip PIC and Atmel AVR
A microcontroller will give you heaps more I/O pins, and PWM for driving motors, serial ports, analog/digital converters etc Both PICs and AVRs are available with all sorts of combinations of features.
There are plenty of resources available for both, look in newsgroups and search with google. GCC for the AVR is available for linux and windows so you can easily write C/C++ code for them. Also look into AVRfreaks
Look at the newsgroup comp.robotics.misc for other people doing similar things.
Good luck!
-Daniel -
Re:Linux friendly microcontrollers
One of the best places for information on AVR software modules, OS's, emulators, compilers, assemblers, application notes, prototype boards, etc. is avrfreaks.net
Many of the software offerings are free (especially those from Amtel and the Open Source world) and most of the prototype boards are very reasonably priced. One of the more sophisticated boards is available for under $200.
Regards,
Ross -
Just finished doing this on a microcontroller
This is really easy, and cheap to do. LEDs shouldn't need any extra components - most bright ones you should be able to drive directly without causing any problems.
For control, you need a few extra components, but not many. A TIP122 or similar power switching resistor (a cheaper 2N2222 might work, dunno) and a 12V power supply can be used to control dirt-cheap automotive relays. The only (minor) gotcha is you need to hook up a diode in reverse across the coil to stop the back EMF. A 1N4002 connected with the negative cathode (the pin with the line on it) to the port on the solenoid you connected to +12 is it. The coffee FAQ has a good starting schematic. Once you can control a relay, you can control the world!
All you need to connect this up is a small value resistor from the parallel port to the base pin of the transistor, connect the relay solenoid between +12 and the collector pin, then tie the emitter to ground. Done!
Another neat trick is using that TIP122 to control the extra fans on your PC. You should wire up a reverse diode across the base and collector of the transistor to protect it from the fan as a safety measure, though.
If anyone is interested in this, though, I highly recommend you look at AVR microcontroller programming. You can use GCC, there's free linux and windows development tools, in C, and more examples than you can shake a stick at. The ability to communicate over serial lets you do all sorts of tricks with your PC.
-
Use Atmel microcontrollers
Lotsa links here...
First of all, the 2002 Burning Man project I did that involved a couple hundred RGB LEDs spinning in a persistence-of-vision-based nighttime animated display. Here is the best picture of it. This is the page about the development details.
The LEDs I used were manufactured by Kingbright. The model I used, the LF819EMBGMBC, is big (10mm) and relatively bright for an RGB LED. I couldn't find any U.S. retailers that actually told the truth about whether they stocked them, so I ended up buying 400 directly from Kingbright for I think a little more than $2.50 each. I still have a few left.
Atmel AVR microcontrollers are just a few bucks each, easily programmable with the STK-500 programmer, also cheap at around $80. I used the ATMega8, which was more than sufficient for my needs. I imagine the original Slashdotter could use one of the ATTiny MCUs, since it really needs only 3 or 4 I/O lines (fewer depending on how many helper circuits you decide to use).
The boards were manufactured by PCBExpress and I was very happy with them. The CAD/CAM software was Eagle, which except for some crashing/redrawing bugs was really amazing. The version I used was free. I tried to buy it but CadSoft has (had?) a fairly crazy pricing scheme that actually left you worse off in terms of acceptable usage if you paid them money than if you used the free version.
The best part of using the Atmel MCU was that GCC can cross-compile for it. So you're basically writing regular old C code but it runs on a little tiny piece of silicon. You'll want to subscribe to the quite active avr-gcc mailing list. Save every message from Marek Michalkiewicz; in my opinion he's the god of GCC-for-AVR development. -
Premature death announcements..
Oh please. I build stuff all the time at home and in the lab, last time I checked, places like Maxim have -free- sample quantities in packages you can work with if you have a good iron (SOIC, et al). Getting boards done in small volume is cheap, use a tool like Eagle, which is even available for Linux (but not OS X, doh!). Spend a few bucks and get a quality board done at a internet based low volume PCB shop.
There are evil packages, but the truth is a lot of the prototyping and test work is done on hand placed boards. Even evil packages can be used if you get an adapter board, there are a few of them out there.
What's more telling is that now instead of messing with token things, and "wow, I actually got something to show up on the display", you can do some real work with your computer and designs and instruments. I realized awhile ago I was spending far too much of my time tinkering with things and not enough accomplishing things.. but I guess some of that is the Linux mentality too.
:) Now I figure out what I want to accomplish and use the best tool, rather than attempting to make everything into a nail for my hammer.For $300 or so you can even get prototype boards for FPGAs if you want to do custom hardware. $150 will get you a decent micro development system, and AVRGCC is gnu, runs on linux and windows (but not OS X
:), and lets you program cheap cheap cheap AVRs to do just about anything you want. Mix with ADCs and some transistor fed relays or PWM control to do whatever. You can get software to turn your PC into a function generator to test, or if you hunt around, you can get a nice old digital oscilloscope AND a real function generator AND a bus analyser suitable for 8 bit micros (or more) for less than the cost of a PC 4 years ago.Same thing applies for most other scientific equipment. Be careful when sourcing chemistry gear, even broken stuff, or you might have the DEA paying you a little visit if you happen to live in the USA. If high voltage fun is your bag, there's companies for that. There are even companies that sell cold fusion experiment kits - although most of the magic there seems to be in the process used to create the electrodes.
I contend there's never been a better time to BE a amateur scientist! You can actually afford to have a decent lab since last year's gear can be tracked down on the cheap.. and accomplish real work, too! How many high res night shots could you store on a $200 80gb drive? Etc, etc, etc, etc.
Death of amateur science predicted! Film at 11.