Hallo zusammen,
ich hatte vor ein paar Wochen schon einmal einen ähnlichen Thread
geöffnet.
Mein Problem:
mit dem PIC32 Starterkit kann ich Dipslay einwandfrei ansteuern:
Die Config Bits für dieses Programm sehen wie folgt aus:
1 | // Oscillator Selection Bits:
|
2 |
|
3 | #pragma config FNOSC = PRIPLL
|
4 |
|
5 | #pragma config POSCMOD = XT
|
6 |
|
7 | #pragma config FPLLIDIV = DIV_2
|
8 |
|
9 | #pragma config FPLLMUL = MUL_20
|
10 |
|
11 | #pragma config FPLLODIV = DIV_1
|
12 |
|
13 | #pragma config FPBDIV = DIV_8
|
14 |
|
15 | #pragma config FSOSCEN = OFF
|
16 |
|
17 | #pragma config IESO = OFF
|
18 |
|
19 | #pragma config FCKSM = CSDCMD
|
20 |
|
21 | #pragma config OSCIOFNC = OFF
|
22 |
|
23 | #pragma config FWDTEN = OFF
|
24 |
|
25 | #pragma config WDTPS = PS1024
|
26 |
|
27 | #pragma config CP = OFF
|
28 |
|
29 | #pragma config BWP = OFF
|
30 |
|
31 | #pragma config PWP = OFF
|
32 |
|
33 | #pragma config DEBUG = OFF
|
Auf dem Starterkit ist ein 8 MHz externer Quarz platziert. Es ergibt
sich ein Systemtakt von 10 MHz.
Ich habe jetzt eine eigene Platine fertigen lassen OHNE diesen externen
Quarz.
Die 10 MHz Systemtakt versuche ich mir über den Fast RC Osc mit PLL
"zubasteln". Diese ConfigBits sehen wie folgt aus.
1 | //******************************************
|
2 | #pragma config FNOSC = FRCPLL // Oscillator Selection Bit -> Fast RC Osc with PLL
|
3 | #pragma config POSCMOD = OFF // Primary Oscillator disabled
|
4 | #pragma config FPLLIDIV = DIV_2 // PLL Input Divider
|
5 | #pragma config FPLLMUL = MUL_20 // PLL Multiplier
|
6 | #pragma config FPLLODIV = DIV_1 // System PLL Output Clock Divider
|
7 | #pragma config FWDTEN = OFF // Watchdog Timer Disable
|
8 |
|
9 | #pragma config FPBDIV = DIV_8 // Peripheral Clock Divisor
|
10 | //#pragma config FPBDIV = DIV_1
|
11 | //#pragma config FCKSM = CSECME // Clock Switch Enable, FSCM Enabled
|
12 |
|
13 |
|
14 | #pragma config FSOSCEN = OFF // Secondaray Osc disabled
|
15 | //******************************************
|
16 | #pragma config IESO = OFF
|
17 | // Clock Switch Disable, FSCM Disabled
|
18 | #pragma config FCKSM = CSDCMD
|
19 | #pragma config OSCIOFNC = OFF
|
20 | #pragma config WDTPS = PS1024
|
21 |
|
22 | #pragma config CP = OFF
|
23 | #pragma config BWP = OFF
|
24 | #pragma config PWP = OFF
|
25 | #pragma config DEBUG = OFF
|
Ich hoffe mir jetzt auch den Systemtakt von 10 MHz mit dem PLL RC
Oscillator gebastelt zu haben, auch wenn dieser etwas ungenauer zu sein
scheint.
Das Display funktioniert jetzt anders auf dem Starterkit nur ohne die
ANzeige von Bildern, d.h. Tocuschreen (SPI Schnittstelle) Texte etc.
funktionieren, nur die Bilder aus dem internen Flash Speicher werden
nicht richtig bzw. gar nicht angezwit.
Ich vermute, dass immer noch ein Fehler bei den Config Bits vorliegen.
Für Anregungen wäre ich mehr als dankbar.
Vielen Dank