I'm migrating from my trusty 12F683 to a 16F1825 and am confused by the config and oscon settings. I'm using PBP3 of course
With 12F683 I have the following.
I just want to make that work with the 16F1825 but using the 16mhz int oscilator. I don't need anything fancy. I appreciate the 16F1825 has two config words.Code:#config __config _FCMEN_ON & _IESO_ON & _BOD_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF & _INTOSCIO #ENDCONFIG OSCCON = 01110101 'Sets internal osc to 8 Mhz (Default) and stable
I was thinking something like
Does the config need to be in CAPITALS? Does the above look comparable to what I have for the 12F683.Code:#config __CONFIG _CONFIG1, _FCMEN_ON & _IESO_ON & _FOSC_INTOSC & _WDTE_SWDTEN & _MCLRE_OFF & _CP_OFF & _IESO_OFF & _BOREN_OFF & _PWRTE_OFF __CONFIG _CONFIG2, _LVP_OFF #ENDCONFIG
With the Oscon reg I'm very confused and am reading the datasheet. I just want it to run at 16mhz on the into osc but all the other settings are making my brainhurt!
I'm also confused about the relationship between the config words and the oscon reg PLLEN etc etc ARRGHHH!!![]()





Bookmarks