sorry for the mistaken thread titlehello Guys
need you help please
im working on a project which includes
3 digits 7segment display = 10 Pins
5 Push Buttons
5 Leds
1 Analog input to measure AC Voltage
1 analog input for thermistor
1 output for buzzer
3 Relays outpus
2 switches inputs
so i need 28 Pins on the MCU & with using internal scillator on ATmega328 i got 23 pins
i have a display board & mainboard & the mcu is located on the mainboard
so from the requirements is there any suggestion to multiplex some on the inputs or ouputs to get more pins?
ATmega328p size is suitable for my project & i cant use more than 13 pins ribbon cable between the display & the main boards
so any suggestion please?
i was thinking of 16Pin MCU on the display board & use serial communication between the 2 boards
is there an small avr MCU ?
im coding on arduino so if i used Pic16F628 what protocol i can use to communicate between the 2 MCU's
thanks
Johnny
what you think of using 1 Analog input for the 5 push buttons with resisotors for each Button ?hello Guys
need you help please
im working on a project which includes
3 digits 7segment display = 10 Pins
5 Push Buttons
5 Leds
1 Analog input to measure AC Voltage
1 analog input for thermistor
1 output for buzzer
3 Relays outpus
2 switches inputs
so i need 28 Pins on the MCU & with using internal oscillator on ATmega328 i got 23 pins
i have a display board & mainboard & the mcu is located on the mainboard
so from the requirements is there any suggestion to multiplex some on the inputs or ouputs to get more pins?
ATmega328p size is suitable for my project & i cant use more than 13 pins ribbon cable between the display & the main boards
so any suggestion please?
i was thinking of 16Pin MCU on the display board & use serial communication between the 2 boards
is there an small avr MCU ?
im coding on arduino so if i used Pic16F628 what protocol i can use to communicate between the 2 MCU's
thanks
Johnny
--- Updated ---
s
sorry for the mistaken thread title
i need 5 more pins in my case
thaks DanaYou could put all 5 buttons and switches on one pin and do the following -
Connecting Multiple Buttons to a Single Pin on Arduino
Connecting Multiple Buttons to a Single Pin on Arduino: Hi Everyone, When your Arduino projects have outgrown blinking LEDs, you may find yourself in a need of some extra pins. I’ll show you a trick that you can use where you can have multiple buttons, all connected to the same analog pin.www.instructables.com
How To: Multiple Buttons on 1 Analog Pin - Arduino Tutorial
How To: Multiple Buttons on 1 Analog Pin - Arduino Tutorial: The Arduino uno board has 12 availabe digital I/O pins and 6 analog input pins, sometimes, on complex or 'big' projects, we run out of digital pins. In this tutorial you will learn how to use multiple buttons on one analog pin. For...www.instructables.com
RaspberryPi: Multiple Buttons on One Digital Pin
RaspberryPi: Multiple Buttons on One Digital Pin: If you ever find yourself running out of GPIO pins on a RaspberryPi you can put multiple pushbutton switches on a single pin using this method. It sets a variable by timing the charging of a capacitor through a series of resistors with the switches …www.instructables.com
You have to do the error analysis of R tolerance and supply to make sure your A/D readings
can be deterministic.
Do the design with Vref = Vdd, then its ratiometric and drops out the Vdd as an error term.
If you use the 1V Vref its +/- ~ 9% error, not good.
Regards, Dana.
Why if you have enough pins......?t
thaks Dana
im thinking of using Attiny13 to drive the 5 leds & use software serial to control it
whay you think ?
regards
Johnny
thank you i will check thisUse HC595 for 8 output = 5Led + 3Relay
You need 03 pins to control 595: Clk, Data, Strobe.
If need more output just serial more 595.
Brg!
im using arduino & a library for the display so is it possible to do this ?Hi,
I guess the display is multiplexed. If so you can (double) use some display pins to multiplex the LEDS and/or the push buttons and/or relays (with a latch). This may save up to 12 pins!.
You may use an I2C or SPI port expander
You may use an I2C or SPI display driver
There will be many other options..
Klaus
i dont have any free pin in my caseWhy if you have enough pins......?
Regards, Dana.
thanks i will check itCheck out Maxim and TI One Wire / I2C I/O expanders, only need one/two pins
for interface.
I/O Expanders - Texas Instruments - I/O Expanders | Online Catalog | DigiKey Electronics
Browse DigiKey's inventory of I/O ExpandersI/O Expanders. Features, Specifications, Alternative Product, Product Training Modules, and Datasheets are all available.www.digikey.com
Interface - I/O Expanders | Electronic Components Distributor DigiKey
Interface - I/O Expanders are in stock at DigiKey. Order Now! Integrated Circuits (ICs) ship same daywww.digikey.com
You know you can get an ATMEGA in a bigger package ?
ATmega Microcontroller Series - Comparison Table
Atmel ATmega Series Microcontrollers Technical Data and Comparison Tableswww.futurlec.com
Regards, Dana.
HI KlausHi,
my ATMEGA328 is just 5mm x 5mm.
You say there is no space for a bigger MCU. But is there space for an extra IC, or even resistors, or even the traces?
Klaus
this can be done with assembly right ?Hi,
I guess the display is multiplexed. If so you can (double) use some display pins to multiplex the LEDS and/or the push buttons and/or relays (with a latch). This may save up to 12 pins!.
You may use an I2C or SPI port expander
You may use an I2C or SPI display driver
There will be many other options..
Klaus
hi KlausHi,
A lot of suggestions are given.
A PCB of 150 x 50 mm is huge.
You easily could place 4 ATMEGA328 as SMD instead of one THM.
Regarding library: I can not say whether you can do it, but generally it is possible.
Maybe you need to modify the lib, maybe not.
And, as always: a sketch is very useful, or pictures, photos, schematic...
Klaus
8 - 3 = 5 ... that's at least what the OP is asking forthe hc595 uses 3 data lines to give me 8 outputs
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?