On 2 Sep 2008, at 10:53 , Rob Hamerling wrote:

> Eur van Andel wrote:
>
>> Another thing: if we use 4 MHZ as clock, we should set IOSCS as well!
>>> pragma target IOFSCS    _4_MHz
>>>
> You openened another can or Microchip worms.....
> In the 10F220/222 _datasheet_ this bit is called IOSCFS, but in  
> the .dev
> files it is called IOFSCS. The latter will be a typo, because the  
> bit is
> called Interternal OSCillator Frequency Select bit.

I didn't even notice :-(

> When you grep for IOSCFS you'll find a couple of other PICS with this
> bit, and with the same meaning.
> I think I'll 'repair' the .dev file for the 10F220/222 and add the bit
> to the blink program for all chips with the IOSCFS bit.
Please do.

> I need also to 'harmonize' the IOSCFS parameter values to F4MHZ and
> F8MHZ (these must start with a non-numeric char).
Better than the leading zero.


>> There is also the matter of the OSSCAL trim value, programmed at the
>> last memory location, but this is too complicated for a blink-a-LED
>> program.
>
>
> OSCCAL, another PITA...
> PICs with OSCCAL in the last word of program memory have that  
> address as
> reset vector. The instruction there is movlw and the next program
> instruction is at address 0x0000. The program is supposed to store  
> W in
> OSCCAL as first instruction (at address 0).  Well, that seems a  
> task for
> the compiler!  I don't see how an application programmer could handle
> this with the current JalV2 compiler.

The first instruction in these PICs needs to be:

asm MOVWF OSSCAL @ 0x0000

And yes, this is a compiler issue.

---
ir EE van Andel [EMAIL PROTECTED]  http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107



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