Bonjour à tous,
est-ce que quelqu'un peut me confirmer que le code ci-dessous configure bien mon PIC18F2510 en mode 'oscillateur interne' (8MHz) + PLL
... Et donc qu'il tourne à 32MHz ...
Les bits de configuration dans MPLAB :Code:#define uChar unsigned char static __code uChar __at 0x300001 CONFIG_1 = 0x08; static __code uChar __at 0x300002 CONFIG_2 = 0x0E; static __code uChar __at 0x300003 CONFIG_3 = 0x1E; static __code uChar __at 0x300005 CONFIG_5 = 0x01; static __code uChar __at 0x300006 CONFIG_6 = 0x81; static __code uChar __at 0x300008 CONFIG_8 = 0x0F; static __code uChar __at 0x300009 CONFIG_9 = 0xC0; static __code uChar __at 0x30000A CONFIG_A = 0x0F; static __code uChar __at 0x30000B CONFIG_B = 0xE0; static __code uChar __at 0x30000C CONFIG_C = 0x0F; static __code uChar __at 0x30000D CONFIG_D = 0x40; [...] OSCCON = 0b01110000; OSCTUNE = 0b01000000; [...]
Je pense que c'est OK, mais j'ai un doute tout d'un coup ...Code:Address Value Field Category Setting 300001 08 OSC Oscillator INT RC-Port on RA6,Port on RA7 FCMEN Fail-Safe Clock Monitor Enable Disabled IESO Internal External Switch Over Mode Disabled 300002 0E PUT Power Up Timer Enabled BODEN Brown Out Detect Enabled in hardware, SBOREN disabled BODENV Brown Out Voltage 4.2V 300003 1E WDT Watchdog Timer Disabled-Controlled by SWDTEN bit WDTPS Watchdog Postscaler 1:32768 300005 01 CCP2MUX CCP2 Mux RC1 PBADEN PortB A/D Enable PORTB<4:0> configured as digital I/O on RESET LPT1OSC Low Power Timer1 Osc enable Disabled MCLRE Master Clear Enable MCLR Disabled,RE3 Enabled 300006 81 STVR Stack Overflow Reset Enabled LVP Low Voltage Program Disabled XINST Extended Instruction Set Enable bit Disabled 300008 0F CP_0 Code Protect 00800-01FFF Disabled CP_1 Code Protect 02000-03FFF Disabled CP_2 Code Protect 04000-05FFF Disabled CP_3 Code Protect 06000-07FFF Disabled 300009 C0 CPB Code Protect Boot Disabled 30000A 0F WRT_0 Table Write Protect 00800-01FFF Disabled WRT_1 Table Write Protect 02000-03FFF Disabled WRT_2 Table Write Protect 04000-05FFF Disabled WRT_3 Table Write Protect 06000-07FFF Disabled 30000B E0 WRTC Config. Write Protect Disabled WRTB Table Write Protect Boot Disabled 30000C 0F EBTR_0 Table Read Protect 00800-01FFF Disabled EBTR_1 Table Read Protect 02000-03FFF Disabled EBTR_2 Table Read Protect 04000-05FFF Disabled EBTR_3 Table Read Protect 06000-07FFF Disabled 30000D 40 EBTRB Table Read Protect Boot Disabled
Merci par avance.
-----