Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 18th February 2007, 10:27 PM   #1
Default 18F4431 Encoder input problem

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
Andy_123 is offline  
Old 19th February 2007, 01:26 PM   #2
Default

Do I have to configure TMR5 if I don't need velocity mode?
Andy_123 is offline  
Old 20th February 2007, 01:48 AM   #3
Default

Answer is here, another error in the datasheet
http://forum.microchip.com/tm.aspx?m=201683
Andy_123 is offline  
Reply

Tags
encoder, input, problem

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
optical encoders? hjl4 Micro Controllers 24 17th January 2008 11:03 AM
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 10:49 PM
1 port with multi input and output function yce_kelvin Micro Controllers 1 2nd July 2004 04:06 PM
1 port with multi input and output function yce_kelvin Micro Controllers 3 2nd July 2004 03:48 AM
Interrupt on GP Change problem Dan East Micro Controllers 2 22nd May 2004 06:12 PM



All times are GMT. The time now is 12:03 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker