Fine-tuning the clock for the GT16A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fine-tuning the clock for the GT16A

914 Views
karthick1987
Contributor II

Hello fellas,

 

Can you guys tell me what I need to do to fine tune the clock by about 12.8kHz? 

 

The reason is that I am using an LCD display which works at 9600bps and I am using something as close as possible which is 9615 bps but I am afraid the LCD module is not working with this !

 

So want to try using the 9600 bps accurately and see if it works. Any help would be appreciated thanks

 

Cheers

Karthick

Labels (1)
0 Kudos
5 Replies

351 Views
rocco
Senior Contributor II

Hi Karthick,

 

9615 baud is awfully close, so I doubt that is your problem.

 

Working with LCDs, I have found that the trickiest part is getting the initial contrast setting correct. It is typically a very narrow range where anything at all will show on the display. I now always check that first, after having chased my tail once to often (I never make the same mistake more than 7 or 8 times).

0 Kudos

351 Views
karthick1987
Contributor II

Hi rocco,

 

As far as I am aware I do see "||" being printed on the screen everytime I reset the micro. Its pretty strange. And I am not sure why? And the contrast is adjusted with the help of a pot on the module. So its not that I dont see anything on the screen. But I will try with increased contrast.

 

Cheers

Karthick

0 Kudos

351 Views
rocco
Senior Contributor II

Hi Karthick,

 

If you are seeing anything on the module, then the contrast is fine. Having a glitch on power-up is not unusual, and it sounds like it helps in that it proves you have contrast.

 

I have never used a serial LCD (I usually opt for the 4-bit parallel interface), but the initialization sequence on the parallel interfaces are pretty particular about timing. I would think the serial interface would take care of that for you, but it is another thing to look at.

0 Kudos

351 Views
peg
Senior Contributor IV

Hello,

 

As left in your previous thread we were trying to acertain whether your clock setup used the internal clock or had an external clock/crystal/resonator etc. Only if you are you using the internal clock can you trim the frequency. This is done by tweeking the trim register for the ICG. Code warrior has a entry for the desired internal oscillator frequency that it will automatically calibrate for when you load your code. It is up to you to determine the buss frequency from your other settings.

0 Kudos

351 Views
karthick1987
Contributor II

Hi peg,

 

I am using the internal buss clock and I want to know where the trim register is. I also wanted to know by how much I could trim the frequency?

 

And I want to make sure I get this right. The internal oscillator feeds the Buss right? and the buss determines the baudrate and everything else dosent it?

 

cheers

Karthick

0 Kudos