A Andy_123 Member Feb 18, 2007 #1 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
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
A Andy_123 Member Feb 19, 2007 #3 Answer is here, another error in the datasheet http://forum.microchip.com/tm.aspx?m=201683