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.

Two microcontroller pins with same signal

Status
Not open for further replies.

suresh200882

Newbie level 3
Joined
Mar 17, 2008
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
hai everyone..

Is it possible to have same signal name to two microcontroller pins in Atmel microcontroller.

I have a code that works with a single pin defined as sbit name = P1^1;
I want to run the same code so that i should be able to see the code on the other pin P1^2;

Thanks & Regards
 

you want change the code to P1^2 it is possibel
 

Could you be more specific in what you are trying to do. Not too clear from your explanation.
 

I want to see the code on two pins at a same time with single common code.
 

Hai

your compiler should support. Normally no compiler will support.

BTW what compiler you are using?

Regards
MicroCon
 

It would not be possible to use same pin name for two pins.Firstly, the compiler won't accept.
what is your application?
If your applications allows, you make a external provision in hardware by dividing the same signal between two paths.
 

Hai
I am using keil compiler.
Hardware is already fixed.

Thanks & Regards
 

There are several ways you can do this. If your hardware can accept delays of a few microseconds then you can just address each pin in sequence. Example P1_1 =a; P1_2 =a. You could address the port directly if no other pins were used, P1=6. If other port pins were used, you can use bit masking so no other bits were altered. No real reason to give 2 pins the same name.
Check out https://www.scribd.com/doc/6560415/Keil-Basics
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top