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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…