Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved] Reducing pin usage in microcontroller

Status
Not open for further replies.

ajitnayak

Junior Member level 2
Joined
Feb 22, 2013
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,447
DEAR ALL.

I am using(LaunchPad MSP430G2553)

I am having totally 16 pins available I.e GPIO other than gnd/vcc/RST

i have totally 20 pin as out put.

4 for speed selector like 100,200,300,400,600in rpm using potentiometer
4 for motion control selector fw,rv,stop using potensiomete
2 for motor drive
2 for analog sensor
2 RTC pin
2 for GPS
4 for operation selector-> init ,manual, automatic,use defined.

Is there any way to reduce pins for connection. I never want to go with resistor selector network. If any other method, please me the link
 

Re: Reducing pin usage in microcontroller

Are u using any standard interfaces? like I2C
 

Re: Reducing pin usage in microcontroller

yes i have mentioned in thread ,RTC uses I2c Interface.
 

Re: Reducing pin usage in microcontroller

In that case u can share the bus right..if u have similar interfaces..
 

Re: Reducing pin usage in microcontroller

i am having single RTC . other are digital pins .i wanna know is there way to minimise my pin external circuits
 

Re: Reducing pin usage in microcontroller

4 for operation selector-> init ,manual, automatic,use defined.
Use analog for this with only 1 analog you can take all 4 swicth

USe R , 2R , 4 R, 8R, 16 R in serie, and put each button in paralell with the resistor, You can know easily what buttom is pressed just checking the bits on AD
 

Re: Reducing pin usage in microcontroller

I never wannt to go with Resistor circuit.SInce module will be placed in high temp zone. it might degrade.on temperature . So i wanna go without resistor combination


4 for operation selector-> init ,manual, automatic,use defined.
Use analog for this with only 1 analog you can take all 4 swicth

USe R , 2R , 4 R, 8R, 16 R in serie, and put each button in paralell with the resistor, You can know easily what buttom is pressed just checking the bits on AD
 

can you give some example how does it work.
How i2c address specified for digital io
just take example of arduino board and can you give me sample code for implimentation



MCP23017 I2C I/O Expander
 

The use i2c comunication, This means your pins will be serialed coded and decoded by software
 

if you have any links please share it.How they accessing digital output through software


The use i2c comunication, This means your pins will be serialed coded and decoded by software
 

Hello!

Just for my understanding:

4 for speed selector like 100,200,300,400,600in rpm using potentiometer

I don't get it: you want to use digital inputs or a potentiometer?
In case of digital inputs, if you remove just one selection, then you can deal with 2 bits:
00 -> 100rpm
01 -> 200
10 -> 300
11 -> 600
If your really need 5 values, then you need 3 bits, and there will be 3 unused positions.
-> 3 bits

4 for motion control selector fw,rv,stop using potentiometer

Again, I don't get it. Forward / reverse is 1 bit. And go / stop is another bit.
-> 2 bits

2 for motor drive

If it's a plain DC motor, you can drive it with a single bit. (including forward / reverse.
-> 1 bit

2 for analog sensor
2 RTC pin

Is it a I2C device?
-> Ok for 4 bits

2 for GPS

UART?
-> Ok for 2 bits

4 for operation selector-> init ,manual, automatic,use defined.

I guess you cannot have simultaneously manual and automatic. This will be 1 bit/
Init, yes, maybe. Use defined, do you mean user defined? Anyway, this is 3 bits
-> 3 bits

-> Total: 15 bits. Should be OK for 16 GPIO.

Dora.
 

This is right combination i m currently using
00 -> 100rpm
01 -> 200
10 -> 300
11 -> 600

bit specified below refer to the out put pin or input pins i m connecting to. I m having only one I2c i.e ds1307 which occupies 2 pins SDA and SCL on board. analog sensor 2 refers, 2 analog output since they occupies 2 pins.So i need method of reducing pins without affecting their functions






Hello!

Just for my understanding:



I don't get it: you want to use digital inputs or a potentiometer?
In case of digital inputs, if you remove just one selection, then you can deal with 2 bits:
00 -> 100rpm
01 -> 200
10 -> 300
11 -> 600
If your really need 5 values, then you need 3 bits, and there will be 3 unused positions.
-> 3 bits



Again, I don't get it. Forward / reverse is 1 bit. And go / stop is another bit.
-> 2 bits



If it's a plain DC motor, you can drive it with a single bit. (including forward / reverse.
-> 1 bit



Is it a I2C device?
-> Ok for 4 bits



UART?
-> Ok for 2 bits



I guess you cannot have simultaneously manual and automatic. This will be 1 bit/
Init, yes, maybe. Use defined, do you mean user defined? Anyway, this is 3 bits
-> 3 bits

-> Total: 15 bits. Should be OK for 16 GPIO.

Dora.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top