BLUESCREEN's BLOG

วันอังคารที่ 17 สิงหาคม พ.ศ. 2553

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)

With 20MHz:PLLCFG_Val EQU 0x0000000B -> 20x12x2 = 480

With 16MHz:PLLCFG_Val EQU 0x0000000E -> 16x15x2 = 480

For Yagarto: in main.c, function InitClock()

With 20MHz:PLLCFG = (12-1) | ((1-1) << 16);

With 16MHz:PLLCFG = (15-1) | ((1-1) << 16);

For CrossWorks: in startup file

With 20MHz:#define PLLCFG_VAL 0x0000000B

With 16MHz:#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.

คลังบทความของบล็อก

Related Link

Subscribe

About US

ThaiEasyElec.com , was established by young and fighting for success engineers in year 2006 .We started our company by selling embedded electronics devices , sourcing on demands and project developers. Our team have more than 10 people , We focus on ARM based application project developers .