OK, here are the results of the "blink a led" test(you won't be happy...)

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)

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

Reading the datasheet, it's said the INTOSC source is a 8MHz clock (something 
like that), and there are postscalers, selected with IRCF. Question now is 
why IRCF = 7 by default where the datasheet says it's 0. (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...


Seb

Le Monday 22 December 2008 17:55:51 Joep Suijs, vous avez écrit :
> 2008/12/22, Sebastien Lelong <[email protected]>:
> > Wow... Thanks for this, and sorry not having checked this (I wasn't even
> > aware of this).
>
> Don't worry - this is what I like to do and am good at. If someone
> would pay for it accordingly, I'd make it my job ;)
>
> > This means all my samples using internal osc @ 8Mhz are
> > bugged ?
>
> I think so.
>
> > I can remember seeing my led blinking @ 1Hz, as expected, using the
> > config in my samples...
>
> The human memory is a strange thing...
> But serious: I got on this track since the serial port did not work. I
> put a blink-loop at the top and had to reduce the time to 2ms to get a
> decent blink. So please re-check your blink example. BTW: Rob uses an
> external oscillator...
>
> Joep
>
> 


-- 
Sébastien LELONG
http://www.sirloon.net
http://sirbot.org

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