Uploading and installing a microprocessor.

Greetings all.

I am currently in the process of making a program for a college project using an Arduino Uno. The problem I have come across is that there isn't enough I/O ports for me to continue.

If I was to purchase and continue the project using an Arduino Mega, could I later:
a) purchase a suitable (standalone) microcontroller (DIP/ PDIP) IC and then...
b) upload the Arduino program to the chip by custom means i.e. home made transfer board.

I don't wish to use the UNO or MEGA boards themselves for various reasons such as cost, size etc.

Cheers in advance!

Ross

Hi and welcome.

mcler002:
b) upload the Arduino program to the chip by typical PIC uploading techniques.

The take over of Atmel by Microchip has yet to have it's influence to the products.
Do not mistake any PIC techniques with anything Arduino please.

Go have a look at CrossRoad's site (click !).
You will find an answer to your question there.
But it's unsure how long those products (in DIP housing) will remain available.

mcler002:
If I was to purchase and continue the project using an Arduino Mega, could I later:
a) purchase a suitable (standalone) microcontroller (DIP/ PDIP) IC

To save yourself a lot of trouble with incompatibilities, it makes sense to use the same microcontroller model for development and for the final product.

And here comes the issue:
The Arduino mega microcontroller Atmel ATmega2560 is only available in an SMD package, not as DIP.

Microcontroller with more outputs than the Uno, which come in a DIP package, are not that common.

Once you've found one, you might find a suitable development board for it, or you will have to build your own development board.

If I assume correctly, you will be building your own board(s) anyway, so that shouldn't be an issue.

Thomas

a) no
b) no
The ATmega2560 (Mega board) is very similar to the ATmega328P (Uno board), but the code needs to be compiled for that specific microcontroller and not every library works for both.
There is no DIP version of the ATmega2560.

Tell us about your project and how many I/O pins you need and for what ?

Building your own 'barebone' Arduino requires knowledge how to do that. It is not just the DIP version of the ATmega328P.

The most common solution is to buy a small Arduino board, like the Arduino Micro, and add shift registers or I2C I/O expanders for more input and output pins.

There are also many (too many) tricks to combine pins and use more pins from the Arduino Uno. There are even more tricks for the Arduino Leonardo and Arduino Micro.

mcler002:
Greetings all.

I am currently in the process of making a program for a college project using an Arduino Uno. The problem I have come across is that there isn't enough I/O ports for me to continue.

If I was to purchase and continue the project using an Arduino Mega, could I later:
a) purchase a suitable (standalone) microcontroller (DIP/ PDIP) IC and then...
b) upload the Arduino program to the chip by typical PIC uploading techniques.

I don't wish to use the UNO or MEGA boards themselves for various reasons such as cost, size etc.

Cheers in advance!

Ross

a) The closest you have to that, is this breakout board for the Atmega2560
breakout board photo

b) What the heck is "PIC uploading techniques" :stuck_out_tongue_closed_eyes: ?

Koepel:
Tell us about your project and how many I/O pins you need and for what ?

The project is to make a cable tester that can test up to 64 individual contacts/ wires. I have previously made one using obsolete IC's so I thought I'd give programming a go. I shall just point out that this project is just to help me meet the criteria for the college unit. It will also push me to make use of my UNO (and possibly my raspberry pi) I had purchased quiet some time back.

I haven't got an exact figure for I/O's but I reckon 25 is a safe figure:

  • 1x [O/P] LED - System 'Functional'
  • 1x [O/P] LED - System 'Error'
  • 2x [I/P] Push button's - Increment or decrement the number.
  • 7x O/P's for binary (64,32,16,8,4,2,1) - I plan to use IC 4028 (from the previous design) to produce the individual signals for each line test. Unless someone has a better idea/ suggestion?
  • 7x O/P's for BCD (Tens, Units) - 2x 7SD.
  • 1x [I/P] Push button - Execute the test cycle.
  • 1x [I/P] Push button - Pause the test cycle.
  • 1x [I/P] Push button - Stop/ Reset the system to default.

Koepel:
Building your own 'barebone' Arduino requires knowledge how to do that. It is not just the DIP version of the ATmega328P.

The most common solution is to buy a small Arduino board, like the Arduino Micro, and add shift registers or I2C I/O expanders for more input and output pins.

There are also many (too many) tricks to combine pins and use more pins from the Arduino Uno. There are even more tricks for the Arduino Leonardo and Arduino Micro.

Shift registers and expanders eh, I shall have a look. Thanks.

mart256:
b) What the heck is "PIC uploading techniques" :stuck_out_tongue_closed_eyes: ?

"Newbie Alert" - Hopefully my correction makes more sense :S?

You can easily manage those 5 push buttons utilizing a single analog input and a handful of resistors.
Frees up 4 pins already.

Have a look at port expanders.
They might help you out too so you can do this with the platform you've already got at hand right now.
You can get them in modules, and read about how to expand the expanders (it's in that PDF).

MAS3:
You can easily manage those 5 push buttons utilizing a single analog input and a handful of resistors.
Frees up 4 pins already.

Hmm I like the sound of that option. I shall have a play around.

MAS3:
Have a look at port expanders.
They might help you out too so you can do this with the platform you've already got at hand right now.
You can get them in modules, and read about how to expand the expanders (it's in that PDF).

Excuse the sigh that is about to come out 'Sigh'. I really appreciate the input, I guess I was just after the 'easy' option XD. I am sure this can benefit me in the long run mind.

@MAS3

Ok so I have looked into the 'Analog button(s)' suggestion briefly and the problem I see with it is that if the operator presses any of the two buttons at the same time [which should not be a typical scenario] then the input reading would be incorrect and could potential cause an error.

My example/ idea (I hope my 'table' makes sense):

5V Supply OP V =
↓→ Button 1 R - 40K 1V IC I/P
↓→ Button 2 R - 15K 2V
↓→ Button 3 R - 6.7K 3V
↓→ Button 4 R - 2.5K 4V
→ Button 5 → 5V
R to G - 10K

That's a problem that can also be overcome.
If you need a multitouch, where any combination of any buttons should be allowed, then you can't do the buttons this way.
If you need some solution where an operator might accidentally push multiple buttons, you need to think about which buttons are likely to be pressed at the same time (this could result in multiple combinations).
Now pick some smart resistor values.

If you have a button to 10K, and a button to 4K7, pushing both buttons will result in a value near 3K3.
So thinking about the values of the resistors for a moment, might help you here.
If you are able to pick the smartest values, you can see which 2 buttons are pressed at the same time.

Another tip:
Do not look for some exact reading from the buttons.
Any glitch will make you miss button presses.
So look for a range.
It's not the smartest idea to connect a button to either 5 volts or GND, except if you need that button to have an absolute priority over the others.
Because connecting it without a resistor means that any other resistors will render useless in such multiple presses.
I'm used to seeing buttons connected to GND, not to 5 volts.

Play around a bit with some resistors and buttons, and see what that does.
Having a display connected would help, but you can also use the serial monitor for this.
This will give you some practice, and fun while you are learning.

:o That moment when you realise you can probably utilize one of the two teensy 3.1 microcontrollers you own... Doh!

A BCD to decimal decoder for testing the wires, I don't know why that can be useful.
There are output shift registers and input shift registers, and I2C I/O expanders.
With Arduino, often a LCD or OLED for text output is used. That can be a I2C LCD.

The I2C I/O expanders is very easy to design something. The pins can be output and input, just as the Arduino pins.

I2C LCD : RGB LCD Shield Kit w/ 16x2 Character Display - Only 2 pins used! [NEGATIVE DISPLAY] : ID 714 : $24.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Shift in : Gammon Forum : Electronics : Microprocessors : Using a 74HC165 input shift register
Shift out : Gammon Forum : Electronics : Microprocessors : Using a 74HC595 output shift register as a port-expander
I2C I/O expander : MCP23017 - i2c 16 input/output port expander : ID 732 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits