Go Down

Topic: Arduino Basic + ATmega8 + ATtiny85 = Teach Class for Kids! (Read 7439 times) previous topic - next topic

WilliamK Govinda

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)


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.


WilliamK Govinda

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:



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.

WilliamK Govinda

Here's the PS2 Mouse/Keyboard code:


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


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



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

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

WilliamK Govinda

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.  :smiley-eek-blue: (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.


WilliamK Govinda

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...


WilliamK Govinda

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


WilliamK Govinda

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...  :smiley-fat:


Coding Badly

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?

WilliamK Govinda

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


And I will use this as the board.


Now I need to learn how to hand-solder SMD chips.  :smiley-eek-blue: :smiley-eek:

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. ;-) He has an electronics shop in his country house, so I'm sure he got some nice SMD tools.



WilliamK Govinda

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.   :(

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)



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 :D

WilliamK Govinda

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. ;-)

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


WilliamK Govinda

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


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131