Skip to content

TP3465V 16 Bit Mode Works Just Fine

August 26, 2016

16-08-26 16 bit working

This has been quietly bugging me for months.  I tried 16 bit mode on the TP3465V spi/microwire chip and just saw munged bits output.  I thought about timing issues but it just seemed unlikely that it wouldn’t work.  I went back to the data sheet and re-wrote simpler code and discovered my error: I was writing the bytes in the wrong sequence! You have to “Write the LOW data byte in the SMB register and then write the HIGH data byte into the FMB byte location. All 16 data bits are shifted out after the trailing edge of the Write strobe for the FMB register”

I’ll have to go back to my lcd screen fill code to see if it makes much difference in application.


void bit16(){
__asm

ld a,0xFF ;set channel 0 to 16 bits
out (0x8c),a ;by writing to the MWM bit

ld a,0x34
out (0x80),a ;second byte

ld a,0x12
out (0x81),a ;first

ld a,0x00 ;set channel 0 to 8 bits
out (0x8c),a
__endasm;
}

I always want the last word so that wordpress doesn’t eat my code!

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: