> ----------------------------------------
> > Hi Vishnu,
> >
> > do you have defined some config ? Look at following line:
> > unsigned int __at( 0x2007)  __CONFIG = _CP_OFF & _WDT_OFF & _BODEN_OFF & \
> >         _PWRTE_ON & _MCLRE_OFF & _INTRC_OSC_NOCLKOUT & _CPD_OFF;
> >
> > This one is for PIC16F630 so you need to define config line by yourself. But
> it should have a look like the line above.
> >
> > Vaclav
> 
> Hey that worked! Thanks Vaclav! I knew it was something silly!
> 
> Why is this piece of crucial information no where in the documentation?
> 
> Regards,
> Vishnu Nambiar.

Hi, to configure the PIC14 oscillator, memory accesses etc. is quite obvious 
thing. You have to do that in assembler and you have to do that in C as well, 
in case you don't use the processor which already has correct config word/s 
programmed (i.e. bootloader application).

You would have to do that in any other language as well and for a lot of 
processors as well. Anyway, other processors can use different way how to 
define configs. For me PIC way is better because you can see everything in 
single file - the code, the configuration. AFAIK, AVRs have "fuses" as well but 
they are defined out of code on some other places.

The truth about your question is that in SDCC, there is only one example in 
PIC16 chapter. Maybe some note in PIC14 chapter would help beginners...

Regards,
Vaclav

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to