Jump to content
43oh

Slow SPI on G2553 with eBay OLED and "The Terminal" Code


Recommended Posts

Below are some logic analyzer screenshots.

The g2553 is set to the internal DCO with a frequency of 16MHz with no prescaler.

The SPI divider UCB0BR0 = 32.

I should be seeing a clock frequency of 500KHz correct? I am however seeing a clock frequency of 3.3KHz.

The data is also being transmitted at a rate of approximately two bytes every 300ms.

 

Using v1.2 for the g2553

http://doc.43oh.com/BoosterPack:OLED#Hardware_revisions

 

Pins :

SCLK 1.7

SDIN 1.5

RES 2.1

CS 2.0

RS D/C 2.2

 

The display is set to run in 3 wire SPI mode. I have tried looking for any code that would be waiting for a response from the display as a possible cause but have not found anything obvious.

 

I have only disabled the port two button interrupts as my display has no buttons.

All the rest of my code is exactly as available above.

 

Thank you for your time.

Please advise if I have left out any critical information.

 

post-11890-0-44561600-1389183006_thumb.png

post-11890-0-24669800-1389183014_thumb.png

Link to post
Share on other sites

Do you have example code of your SPI setup? Because now I have to guess what you're doing there:

- Are you sure you set DCO to 16MHz?

- Are you sure you set SMCLK to DCO/1?

- Are you sure UCB0BR1 is equal to 0?

- Are you sure your logic analyser can keep up with at the very least double the datarate? (ie: is your logic analyser sample rate at least 1 Msps?)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...