t-edson / PicPas

Compilador en Pascal para microcontroladores PIC / Pascal compiler for PIC microcontrollers
GNU General Public License v2.0
88 stars 27 forks source link

internal oscillator and config value for 12f675 #20

Closed alexpseletr closed 6 years ago

alexpseletr commented 6 years ago

I checked the documentation and the source code and found no reference to the internal oscillator of 12f675 {$ CONFIG}

{$CONFIG _CP_ON,_CPD_ON, _WDT_OFF, _WRT_OFF, _DEBUG_OFF, _LVP_OFF, _BOREN_OFF, _PWRTEN_OFF, INTOSC_NOCLKOUT }

t-edson commented 6 years ago

The problem here is that PicPas have not libraries for using the PIC12F675. You need to create some similar to https://github.com/t-edson/PicPas/blob/0.8.2/units/PIC16F84A.pas And as you can see, there are definitions for Bits Configuration.

Only after having that definitions, you can do something like:

{$CONFIG _CP_ON,_CPD_ON, _WDT_OFF, _WRT_OFF, _DEBUG_OFF, _LVP_OFF, _BOREN_OFF, _PWRTEN_OFF, INTOSC_NOCLKOUT }

If you haven't bits definitions you only can do something like:

{$CONFIG $3FFD}