Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Incrementing POSCNT

Status
Not open for further replies.

camerart

Well-Known Member
Hi,

Does anyone know if there is a way of incrementing:
CAP2BUFL POSCNT.LB
CAP2BUFH POSCNT.HB
up and down in Oshonsoft SIM please?

Camerart.
 
Hi,

STOP THE PRESS, I think I've got it!!!
DIM posinc as word

If PORTB.0 = 1 Then
posinc = posinc + 1
Endif
If PORTB.1 = 1 Then
posinc = posinc - 1
Endif
CAP2BUFL = posinc.LB
CAP2BUFH = posinc.HB

Thanks, if you started to work on it.

C.
 
hi C,
I have already placed a up/dwn count option for CAP2BUF when using the IDE sim.
Look at the earlier test/demo's I posted for you.

E;)
 
Hi Eric,

I thought so, and looked, but could only find the POT/PWM one. I've just had a longer look and found them, thanks:)

C.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top