2008/12/22, Sebastien LELONG <[email protected]>:
>
> OK, here are the results of the "blink a led" test(you won't be happy...)
More bug-smashing, I like that :)

> When declaring "pragma target clock 8_000_000" and "pragma target OSC
> INTOSC_NOCLKOUT", and :
>
>  * not setting OSCCON_IRCF, the LED blinks @1Hz (I swear)
>  * OSCCON_IRCF = 7, the LED also blinks @1Hz
>  * OSCON_IRCF = 0, the LED blinks @ ..... I don't know, it's so
> slooooowwww.... but setting "pragma target clock 31_250" gives a 1Hz blinking
> LED, as expected according to the datasheet (also tested OSCON_IRCF = 1 with
> clock 115_000, blinks @ 1Hz as expected too)
That's good - this did not work like it should, but does now!

>
> What about i2c ? I've tried setting OSCCON_IRCF = 7, as you suggested, and...
> it does not work (as expected I'd say).
I'll work on this.

> Reading the datasheet, it's said the INTOSC source is a 8MHz clock (something
> like that), and there are postscalers, selected with IRCF.
It is. But intosc is not fed into the cpu (see figure 4-6)

> Question now is
> why IRCF = 7 by default where the datasheet says it's 0.
It's not. It's 0, giving 31.25 khz.

> (not sure this is
> good test, but serial_hw_write(OSSCON) give "|", 124 decimal, 1111100 binary
> (IRCF = 111 = 7). IRCF = 0 might be the default only for INTRC, not INTOSC...
I'll check that along the way.

Joep

--~--~---------~--~----~------------~-------~--~----~
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