New revision with 16MHz crystal
Since August 2010, ThaiEasyElec has released new revision PCB of BlueScreen board and there are some changes that affect the programming.
First, please notice on the board to identify new revision. Old generation of BlueScreen comes with 20MHz oscillator, but with the latest, 16MHz crystal comes instead.
Even that we are lowering the cost but you will got more since the new revision boards are manufactured with lead-free PCB and lead-free process. Plus with environment coating that protects the board from dust and humidity. Now they’re ready to be put into your products with higher reliability!
Now let’s see how to change the code downloaded from website to maintain correct operations. Only PLL multiplier is needed to be changed from 12 to 15.
For Keil’s uVision: in startup file (LPC2300.s)
PLLCFG_Val EQU 0x0000000B -> 20x12x2 = 480
PLLCFG_Val EQU 0x0000000E -> 16x15x2 = 480
For Yagarto: in main.c, function InitClock()
PLLCFG = (12-1) | ((1-1) << 16);
PLLCFG = (15-1) | ((1-1) << 16);
For CrossWorks: in startup file
#define PLLCFG_VAL 0x0000000B
#define PLLCFG_VAL 0x0000000E
After modification, we have tried our old project on new hardware and we experienced that ADC need lower clock to operate (until now we can’t find any reason). So if you’re using ADC and the MCU hangs waiting for ADC to complete the conversion, try reducing ADC speed.