Comment #1 on issue 152 by robhamerling: Blink sample of 18f27j53 has LED blinking at half speed
http://code.google.com/p/jallib/issues/detail?id=152

The reason for the blinking at half-speed is that 'pragma target CPUDIV P2' is specified. With CPUDIV a divisor value is selected for the oscillator frequency to obtain the desired processor frequency. With a specification of 'P2' the processor will run at half the speed of the (primary) oscillator. Blink samples should specify 'pragma target CPUDIV P1'. The fix applies to many PICs (of the 18F family only).

Related to this:
The device files of some 18F PICs have a bug: the keywords for CPUDIV do not represent the correct divisor value, in most cases a factor 2 different (fr example 'P2' represents divisor value '1'). This means that blink samples for these PICs have the led correctly(!) blinking at 2 Hz (one error compensating the other). The device files of the following PICs will be fixed such that the CPUDIV keywords represent the correct divisor value (P1 for divisor value 1, etc.):

18f2450
18f2455
18f2458
18f2550
18f2553
18f4450
18f4455
18f4458
18f4550
18f4553





--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to