Hi, this year I have to hand in a project in the C language and I thought about doing the battleships game with electronics.
I thought about adding a feature of having 2 battleships boards that can play remotely from a network.
Because buying another arduino is a little bit expensive, I thought about buying a microcontroller, a few pushbuttons and a few leds and soldier it to a pcb.
My question is that wether such thing is possible, and how can i make such a board that connects to the usb, and reacts to user inputs like the arduino does using Serial.digitalread(number)
thanks very much for those who help :)
A "simple" circuit
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23910
- Joined: Mon Apr 21, 2008 2:33 pm
-
- Posts: 373
- Joined: Tue Mar 06, 2007 11:51 pm
Well, in parts, you'll need the same microcontroller and clock crystal that the arduino has at the very least, plus whatever parts you need for your project. Then, you'll need either the USB to serial converter used on the arduino (a surface mount chip) or a USB to serial converter cable (cost is usually between $15-$20) so that you can use the PC to talk to the microcontroller via USB.
You'll need to use your existing arduino to program the arduino firmware into the new chip first, but after that, the two things should share similar functionality.
You'll need to use your existing arduino to program the arduino firmware into the new chip first, but after that, the two things should share similar functionality.
- westfw
- Posts: 2008
- Joined: Fri Apr 27, 2007 1:01 pm
How about one of the cheaper versions of the Arduino? The BoArdunino kit is about half the price of a full ardunio, and an MDC "Really Bare Bones Board" kit is about 1/3 the price. Or you could make a serial single sided PCB on your own, and populate it with just the bits you need...Because buying another arduino is a little bit expensive
-
- Posts: 235
- Joined: Tue Dec 04, 2007 1:22 pm
thanks people, my intention was to load to it only 1 program, and thats it.
i do not want a microcontroller as smart as arduino or boarduino, something like TV-B-Gone, it has only one program and it doesnt have to be reprogrammed, but it needs to have a usb connector because it needs to have input/output.
do any of you have a website that explains how to do that?
thanks
p.s.
i dont think i'm allowed to use the arduino/boarduino, i need to use something i made on my own.
i do not want a microcontroller as smart as arduino or boarduino, something like TV-B-Gone, it has only one program and it doesnt have to be reprogrammed, but it needs to have a usb connector because it needs to have input/output.
do any of you have a website that explains how to do that?
thanks
p.s.
i dont think i'm allowed to use the arduino/boarduino, i need to use something i made on my own.
-
- Posts: 373
- Joined: Tue Mar 06, 2007 11:51 pm
For learning how to use the AVR microcontroller family, browse around this website & forum a bit, but also check out http://www.avrfreaks.net
As for what microcontroller you want, the Arduino's microcontroller is about as small as you can get to be able to have USB functionality without a converter cable/chip. If you get a USB to serial converter cable though, you can probably check out the ATtiny85. Unfortunately, you'll also need a programmer to get the code into the chip for the first time, since I think the Arduino is only meant to program the ATmega168.
As for what microcontroller you want, the Arduino's microcontroller is about as small as you can get to be able to have USB functionality without a converter cable/chip. If you get a USB to serial converter cable though, you can probably check out the ATtiny85. Unfortunately, you'll also need a programmer to get the code into the chip for the first time, since I think the Arduino is only meant to program the ATmega168.
-
- Posts: 79
- Joined: Sat Aug 23, 2008 12:14 am
IF he used serial for input output then he may be able to use the attiny13v-10PU because it is cheaper, but has a little less memory, it shoudl work though.The_Don125 wrote:For learning how to use the AVR microcontroller family, browse around this website & forum a bit, but also check out http://www.avrfreaks.net
As for what microcontroller you want, the Arduino's microcontroller is about as small as you can get to be able to have USB functionality without a converter cable/chip. If you get a USB to serial converter cable though, you can probably check out the ATtiny85. Unfortunately, you'll also need a programmer to get the code into the chip for the first time, since I think the Arduino is only meant to program the ATmega168.
-
- Posts: 373
- Joined: Tue Mar 06, 2007 11:51 pm
IF he used serial for input output then he may be able to use the attiny13v-10PU because it is cheaper, but has a little less memory, it shoudl work though.[/quote]
It will all depend on how many I/O ports are needed. Since the project is a "battleship game", I think more than the 5 pins a tiny13 can offer will be needed (and those 5 pins will be cut down to 3, since 2 are needed for serial communication (and I'm not even sure the tiny13 supports UART communication))
It will all depend on how many I/O ports are needed. Since the project is a "battleship game", I think more than the 5 pins a tiny13 can offer will be needed (and those 5 pins will be cut down to 3, since 2 are needed for serial communication (and I'm not even sure the tiny13 supports UART communication))
-
- Posts: 79
- Joined: Sat Aug 23, 2008 12:14 am
The_Don125 wrote:IF he used serial for input output then he may be able to use the attiny13v-10PU because it is cheaper, but has a little less memory, it shoudl work though.
Well then, maybe a ATtiny2313V-20PU woudl work, its not too big, its alot bigger but still, it woud work, as im sure you could fit it somewhere. Maybe a usb interface chip and a usb jack.The_Don125 wrote: It will all depend on how many I/O ports are needed. Since the project is a "battleship game", I think more than the 5 pins a tiny13 can offer will be needed (and those 5 pins will be cut down to 3, since 2 are needed for serial communication (and I'm not even sure the tiny13 supports UART communication))
- keen101
- Posts: 52
- Joined: Wed Apr 23, 2008 8:51 pm
-
- Posts: 6
- Joined: Thu Oct 16, 2008 11:15 am
Re: A "simple" circuit
If you want to go dirt-cheap on the hardware and you think the ATTiny85 has enough I/O ports, then have a look at my 1-key-keyboard. It cost me about 2 Euro to make.
http://blog.flipwork.nl/?x=entry:entry081009-142605
- No need for crystal because it uses the internal oscillator on the ATTiny85
- It implements Objective Development's AVR-USB so no need for USB to serial converter
- Since I use only 1 switch, 3 I/O's are still free
http://blog.flipwork.nl/?x=entry:entry081009-142605
- No need for crystal because it uses the internal oscillator on the ATTiny85
- It implements Objective Development's AVR-USB so no need for USB to serial converter
- Since I use only 1 switch, 3 I/O's are still free
- waldo2020
- Posts: 7
- Joined: Thu Oct 23, 2008 4:16 pm
Re: A "simple" circuit
what about building your own arduino?
well just an atmega168, reset resistor, 7805 regulator and crystal.
much cheaper than bough one (6$) wired on a perfboard.
you can expand the i/o using shift registers for led row/col driving
and 8 lines to read a scanned 4x4 keypad. use a pwm for sound effects.
well just an atmega168, reset resistor, 7805 regulator and crystal.
much cheaper than bough one (6$) wired on a perfboard.
you can expand the i/o using shift registers for led row/col driving
and 8 lines to read a scanned 4x4 keypad. use a pwm for sound effects.
Please be positive and constructive with your questions and comments.