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.

Help needed with assembly language

Status
Not open for further replies.

me1234

Newbie level 3
Newbie level 3
Joined
Dec 8, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,306
Im new in coding assembly language. using mplab for pic18

An input signal on pin RA0 will be used to enable th eoutput pulse sequences. when the input goes high, the output pulse sequences on pic RC0 and RC! should start from the point at which RC0 is taken high. The output pulse sequence should continue repeadly until the input on RA0 is taken low, at which time both output, RC0 and RC1 should be taken low.

help would be appreciated as im quite lost in how to do this!
 

many ways to do this, and your choice of method depends on the speeds involved, on how you are generating RC0 & RC1 sequences, on your timing accuracy requirements, etc etc.

The simplist method of course is to continously read (input) the RA0 pin, and set a flag/ enable RC0 &RC1 if its High, and reset the flag/ disable RC0RC1 if its Low. Do this in a loop forever.

You could also setup RA0 to trigger an interrupt on positive edge, and the change the interrupt to trigger on negative edge. Basically change the sense of the trigger input on every input. I don't know if your PIC has this feature though. Set flags or directly enable/ disable your rc0RC1 within the ISR itself.

Many variants to these basic schemes, but hope this sets you on the right track.

cheers!
 

many ways to do this, and your choice of method depends on the speeds involved, on how you are generating RC0 & RC1 sequences, on your timing accuracy requirements, etc etc.

The simplist method of course is to continously read (input) the RA0 pin, and set a flag/ enable RC0 &RC1 if its High, and reset the flag/ disable RC0RC1 if its Low. Do this in a loop forever.

You could also setup RA0 to trigger an interrupt on positive edge, and the change the interrupt to trigger on negative edge. Basically change the sense of the trigger input on every input. I don't know if your PIC has this feature though. Set flags or directly enable/ disable your rc0RC1 within the ISR itself.

Many variants to these basic schemes, but hope this sets you on the right track.

cheers!

How do you set the RC0 and RC1 as high or low?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top