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.

18F4431 Encoder input problem

Status
Not open for further replies.

Andy_123

Member
Was playing with 18F4431 this cold weekend, few things still not clear:

- PWM mode works just fine, using 12 bits,
but if I am trying to read PTMRH - reading always 0, PTMRL - no problem - changing fast

- Encoder input - not working at all I just need aimple counter with A/B signals:
Here what I have:
Code:
  MOVLW B'11111111' 
  MOVWF TRISA, 0
  MOVLW B'00000100' 
  MOVWF QEICON, 0
  MOVLW B'11111111' 
  MOVWF MAXCNTL, 0
  MOVLW B'00000011' 
  MOVWF MAXCNTH, 0

Reading POSCNTH, POSCNTL - nothing always 0, if I write something to pos counter, I see these values

Any ideas?
Thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top