Hi,
I have had a bootloader written for me by a person in Romania, what a mistake. He was able to get the external OSC for 4 & 20 MHz very easy. After several failed attempts at the 8MHz internal I am concerned. He has only gotten the 4MHz to work and I had to set OSCCON to 0x70 to get it to behave like 8MHz with timing of blinking LED.
The datasheet for 16F886, page 62 talks about bit 1 & bit 2. HFINTOSC is stable = 1, not stable = 0.
Are these reported back to me or must bit 2 bet set to 1 in order to make it stable for 8MHz????
In the bootloader code I have found an area where I think the programmer is setting OSCCON to 0x70 (see below) which, I think this would put the bootloader in 8MHz mode.
Is changing OSCCON from whatever the default is, to 0x70 the proper way for the bootloader to run at 8MHz?
In my code can I change the OSCCON to = 4MHz and have it replace his values?
It also looks to me like he is clearing the OSCTUNE register?
Will I be able to set the OSCTUNE register in my program ans have it replace his?
Here is the code, there is also a line in the code that looks like a binary pattern being used, can anyone tell me what this is doing?
StartBoot bcf INTCON,GIE
call bank1
movlw 0x70
movwf OSCCON
clrf OSCTUNE
bsf TXSTA,BRGH
bcf TXSTA, SYNC
movlw UsartCt
movwf SPBRG
call bank0
movlw b'10010000'
movwf RCSTA
movlw 0x55
call Transmit
movlw 0xAA
call Transmit
movlw d'100'
movwf cont3
I know this is not your products or any issues with Flowcode, I only hope to you can help me out.
Thank you,
Ron
OSCCON with 16F886 & 18F2620
For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.
Jump to
- Announcements
- ↳ Announcements
- The Knowledge Exchange
- ↳ Programming Tips & Tricks
- ↳ Freelance Embedded Engineers
- ↳ Article Discussion
- Microcontroller Programming
- ↳ General Programming
- ↳ Flowcode V9
- ↳ Flowcode V8
- ↳ Feature Requests
- ↳ Bug Reports
- ↳ User Components
- ↳ Flowcode V7
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Fixed bugs
- ↳ 8-Bit PIC
- ↳ 16-Bit PIC
- ↳ 32-Bit PIC
- ↳ AVR & Arduino
- ↳ 32-Bit ARM
- ↳ Poll Discussion
- ↳ Flowcode V6
- ↳ Flowcode v6 Beta
- ↳ Bug reports
- ↳ Getting Started
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Flowcode V5
- ↳ Flowcode V5 Issues
- ↳ Flowcode V5 Suggestions
- ↳ Flowcode V5 Free Edition
- ↳ Flowcode V4
- ↳ Flowcode 4 Bugs
- ↳ Flowcode 4 Suggestions
- ↳ Flowcode V2 & V3
- ↳ General / Misc
- ↳ Components (Comms)
- ↳ Components (Other)
- ↳ Bugs / Application Errors
- ↳ Suggestions
- ↳ BTEC Unit 6
- ↳ C and ASM Programming
- ↳ E-blocks
- ↳ Formula AllCode
- ↳ Formula Flowcode
- ↳ MIAC
- Language Support Forums
- ↳ Deutsch Support-Forum
- ↳ Forums d'aide en français
- ↳ Foro de soporte español
- Other Matrix products
- ↳ Electronics products
- ↳ Matrix Online Courses
- ↳ Other products
- ↳ CoCo
- Hidden