It's UNIX-like because it's reminiscent of the shell account you went out and bought to run your irc nick collision bots on, as well as having a command or two in common. It also has a filesystem that resembles UNIX extfs, using an external EEPROM, but that's become a project unto itself so I'll be releasing that module separately under a different instructable when it's production-ready.
Here's a list of the things you can currently do with the AVR Shell:
- Read all your Data Direction Registers (DDRn), ports, and pins in real-time
- Write to all your DDRn's, ports, and pins to turn on motors, LED's, or read sensors in real-time
- List all known registers on the system
- Create and store values in user-defined variables backed up by EEPROM.
- Create a root password and authenticate against it (used for telnet access)
- Read the configured CPU clock speed
- Change your CPU clock speed by setting a prescaler
- Start and stop 16-bit timers for timing of various things
- Power up and/or power down peripheral sub-systems: Analog to Digital Converters (ADC), Serial Peripheral Interface (SPI), Two-wire Interface (TWI/I2C), UART/USART. Useful for when you want to reduce power consumption of the microcontroller or to enable certain functions.
- Written in C++ with reusable objects.
Remove these ads by
Signing UpStep 1What You'll Need
- Have an Arduino or ATmega328P. Other AVR's could work, but you may need to modify the code to list any registers that are unique to your MCU. The names only need to match what is listed in the <avr/io*.h> header file unique to your MCU. Many of the register names are the same between AVRs, so your mileage may vary when porting.
- Have a way to connect to the serial USART of your Arduino/AVR. The system has been tested most extensively with the AVR Terminal, a Windows app that makes a serial connection via your USB or COM port. Works with Arduinos using the USB connection and any AVR using the USB-BUB from Moderndevice.com. Other terminal options include: Putty, minicom (Linux and FreeBSD), screen (Linux/FreeBSD), Hyperterminal, Teraterm. I've found putty and teraterm send some garbage when connecting so your first command may be garbled.
- Have the AVR Shell firmware installed and running, which you can download from these pages, or always get the latest version at BattleDroids.net.
Note: The PROGMEM attribute is broken in the current AVR GCC implementation for C++ and this is a known bug. If you compile it, expect to get many warning messages saying "warning: only initialized variables can be placed into program memory area." Besides being annoying to see, this warning is harmless. As C++ on the embedded platform isn't high on the AVR GCC priorities list, it is unknown when this will be fixed. If you check out the code, you will see where I have made work arounds to reduce this warning by implementing my own attribute statements.
Pretty simple. Download and install anything that you might need to then flip the page and let's get crackin'.
| « Previous Step | Download PDFView All Steps | Next Step » |










































so question is what compiler was used and what platform of c as it really don't want to be nice to me ..
Sorry to hear you're having so many problems with the compile. To be honest, I haven't tried compiling it under AVR Studio 5 yet. I believe I used either WinAVR or avr-libc and the avr (gcc 4.5.2) package under Linux.
If I get some free time I'll try converting the package over to AVR Studio 5 and post a zip file.
Good luck!
-gian
hopefully i will learn from it
I like it, max Kudos!
rf_
I wrote the shell over the course of a weekend, and the windows terminal in about a week. It took longer for the terminal than I expected because I was doing research-oriented development and added a TCP/IP server to it so it could proxy telnet to my AVR and Arduino. I have a half-written "Telnet to your Arduino" instructable that I just never had the heart to finish. haha.
The shell is somewhat naive, being a first-pass stand-alone shell. I have a much more robust command interpreter that's being released with the μnix workstation and μnix Operating System when it gets to some level of usability.
Uart 9600
no parity
1 stop bit
Receive polarity idle 0
Output type normal (high=3.3volts, low=ground)
I was trying to use it as a Uart bridge which makes the bus pirate act as a regular RS232 usb adapter. When i connect i get nothing but 0xFF over and over.
Any ideas?
That's probably whats messing with mine, i'll fix it and post reply if everything works out.
Good luck!