Arduino Basic + ATmega8 + ATtiny85 = Teach Class for Kids!

Here's the idea:

Run Arduino Basic on a ATmega8 (will need to tweak the code to make it use less RAM and Flash, will start do soon)

http://ec2-122-248-210-243.ap-southeast-1.compute.amazonaws.com/mediawiki/index.php/Arduino_Basic

Make a tiny terminal with this:

  • ATtiny85 using the internal 8Mhz clock
  • PS2 keyboard connector (2 wires)
  • 16x2 LCD using a C164 or C595 shifter (2 wires)
  • I2C or UART connection to the main board above (2 wires)

This is to teach kids the startup of robotics/microelectronics. And they are mostly poor, so, no computer, no expensive stuff.

Wk

I still don't know about the PS2 keyboard and LCD on the Tiny85, but I'm just wish-hoping it will fit and work. Since nothing else will run on the thing it should be good to go. Them this board can be larger while the actual target will be very very small so it could fit on top of a mini-car or something like this:

http://elm-chan.org/works/ltc/report.html

And please, no, I can't teach C and use the Arduino IDE, as those kids can't afford computers and I can't afford to buy computers for the class, as this is mostly a hobby/charity thing for now.

Here's the PS2 Mouse/Keyboard code:

http://www.arduino.cc/playground/ComponentLib/Ps2mouse

And here's how to use 2-wires to connect the LCD with a cheap shift-chip:

http://code.google.com/p/arduinoshiftreglcd/

Them there's also the ATtiny85 I2C/Uart code:

http://code.google.com/p/arduino-tiny/

This is very cool, and from what I've seen of your hacks, if anyone can pull this off it is you :slight_smile:

--
The Basic Motor Driver: simple, inexpensive motor driver for 1 stepper motor or 2 DC motors

Oh yeah, I also hope so, thanks.

BTW: it seems that the 2-wire scheme doesn't work on the LCD with C595, so I had to order some SN74LS164 just for that. :fearful: (they are cheap, uff)

I also got some ATmega8 just to be sure it will work on those, but for now I test on the regular ATmega328 I got here.

Wk

Ah, I already noticed that I will be using the SoftwareSerial library to handle the UART. Now I hope that there will still be room for the PS2 code. From what I could see the PS2 code works with interrupts, have to check how many we got on the ATtiny85...

Wk

Well, from the datasheet, any pin can have pin-change interrupt, so that's nice to know. 8)

Wk

Actually, all in all I think I will stick with the ATmega8 for both devices. The advantage is that I could use the direct LCD mode without an extra shift-chip, and also there's the Hardware Serial (UART) ports to talk to each other, much nicer.

So I'm ordering some SMD ATmega8 and conversion boards to make some tests. I plan on testing things soon.

The challenge will be update the Arduino code so it uses less RAM freeing more RAM for the Basic. But since the EEPROM has only 512 bytes, there's not much need for more than that anyway, which I doubt I would get in any event. The ATmega8 has only 1K of RAM, and currently TinyBasic uses around 640 bytes, so if I could drop to 512 bytes or so, it would be perfect.

This will be used for basic stuff, so 512 bytes should be enough. And we could always add Macros and new Instructions for things making the BASIC code even smaller. We will see... :drooling_face:

Wk

Actually, all in all I think I will stick with the ATmega8 for both devices. The advantage is that I could use the direct LCD mode without an extra shift-chip, and also there's the Hardware Serial (UART) ports to talk to each other, much nicer.

What do you think about using an ATtiny2313 instead of the ATtiny85?

I couldn't find good prices on eBay, while I got some good prices on the ATmega8.

http://www.ebay.com/itm/170659460920?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

And I will use this as the board.

http://www.ebay.com/itm/270707899662?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

Now I need to learn how to hand-solder SMD chips. :fearful: :astonished:

But I met an old guy around here that is an expert and he's retired, so he may help me out, at least I'm hoping so. :wink: He has an electronics shop in his country house, so I'm sure he got some nice SMD tools.

Wk

why not just hook everything up to a 328p? http://www.mouser.com/ProductDetail/Atmel/ATMEGA328P-AU/?qs=sGAEpiMZZMvu0Nwh4cA1wRKJzS2Lmyk%252brzyUxJFNGOs%3D if you buy 25 they are only $2.97, and you'd double your ram.

Thanks for the idea, but sadly, since I'm in Brazil, Mouser charges $40 for transportation. So, if I buy 10 units, the total bill is $70, since its over $50, and its from a company, I pay 100% custom taxes on top, for a total of $ 140 USD for 10 chips alone. :frowning:

Also, I want to keep 2 boards. One for the Terminal alone, and another for robotics, so it could be as small as possible, to fit in a mini rc car. 8)

Wk

Wow, that's expensive. If you get it working though maybe I'll modify what you have. I was thinking, if I can find an old big keyboard with some extra space, of mounting the lcd and 328p in the keyboard case. Then you'd have a tinyBasic laptop :smiley:

I do have 6x ATmega328, so I may try those for the target board, and still use the ATmega8 for the Terminal board.

The advantage is that I still save a few bucks on the Terminal board while having a good target board. I wonder if I could use the TinyBasic at 20Mhz, as I got some 20Mhz crystals too. :wink:

I just need to learn how to solder SMD chips now, a friend already gave me great tips. :grin:

Wk

I haven't done the tests yet, but as soon as some parts arrive, I will start testing things out.

Wk

Just saw your post today. I've made a serial panel, which does what you want on a multi-tap keypad, instead of PS/2 keyboard:

The panel is like a terminal. It wraps texts and automatically scrolls and accepts ASCII or ANSI commands such as \f for clear screen \b for back space etc.

I am making a back pack version of it (no integrated keypad) and could include capabilities to connect to a PS/2 keyboard. Any interest?

Thanks for the offer, but right now I only need 4 boards, and I already managed to make those here. :wink:

Wk

WilliamK:
Thanks for the offer, but right now I only need 4 boards, and I already managed to make those here. :wink:

Wk

I'm very interested in the outcome (maybe that will take a semester or two). I learned computers on an apple 2 with BASIC :slight_smile: