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.

How to Toggle PCA Pin Manually in C8051F120?

Status
Not open for further replies.

Karthikeyan.K

Newbie level 4
Newbie level 4
Joined
Jan 8, 2015
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
77
Respected all,

Please anybody guide me in this. I am using C8051F120. I have enabled PCA module in High Speed Output mode. In this mode, PCA will toggle the CEXn pins when a match occurred between PCA Counter (PCA0H,PCA0L pair) and the PCA Compare Register (PCA0CPH0,PCA0CPL0 pair). So I have to the count into the PCA Compare register (PCA0CPH0, PCA0CPL0 pair) after which a toggling should happen. And I did it. PCA also working good only. But at some instance I have to manually Toggle that CEXn pins in my code. How can I Manually ON or OFF a CEX0 pin (for example) while it is used by PCA module.

ie: I have to Make that CEX0 Pin ON, and then I have to start the Counter (CR = 1).
But how can I make CEX0 Pin as ON or else OFF on my own when PCA is enabled and it uses that CEX0 Pin? In my case CEX0 Pin is routed to P1_0 Pin. So Can I do it by setting P1 = P1 | 0x01; ?

Also How to check the current status of that CEX0 Pin? By checking like if( P1 & 0x01) ?

When CEX0 Pin is routed to P1_0 Pin, Can We manually toggle or sense that P1_0 Pin?

This what my question. Please anybody guide me in this. Thanks in advance.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top