CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

T6963C image showing

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

T6963C image showing
PostPosted: Fri Sep 11, 2015 6:25 am     Reply with quote

Hello,
I am using the T6963C driver found in the code library.. works fine.
However. When I do:
Code:

glcd_image8(&bt_logo[0],0,0,8,11);
glcd_image8(&bt_logo[0],5,12,8,11);

both the pictures are shown at x=0.
When I do:
Code:

glcd_image8(&bt_logo[0],0,0,8,11);
glcd_image8(&bt_logo[0],13,12,8,11);

the first image shows up at x=0 and the second at x=8.
I can't get the image to show up at the location I want.. It goes in step off 8 bit..
But I can't find the spot where it goes wrong.....
Anybody an idea?


Regards,
Jody
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Sep 11, 2015 10:21 am     Reply with quote

A search finds three T6963C drivers in the code library.

Post a link to the one you are using.
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

driver i use
PostPosted: Fri Sep 11, 2015 11:42 am     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=31255&highlight=t6963c

greetings,
jody
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Sep 13, 2015 2:47 am     Reply with quote

It appears that this routine is intended to place images on 8-pixel boundaries.
That's because it calls the glcd_pixel8() function, and if you look at that
function, it divides the x parameter by 8. In other words, it throws away
any resolution finer than 8 bits. Any incoming x parameter from 0 to 7
will be truncated to 0. Any incoming x parameter from 8 to 15 will be
truncated to 8. This is what you are seeing.
Code:
// glcd_pixel8(x,y,px8) sets 8 pixels in line.
void glcd_pixel8(unsigned int8 x, unsigned int8 y, int8 pixel8){
   unsigned int8 x_H;
   x_H = (x / 8);   // *** x parameter is divided by 8 ***
   glcd_gotoxy(x_H+1,y,0);
   glcd_WriteCmd1(pixel8,0xc0);
}
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

PostPosted: Sun Sep 13, 2015 3:33 am     Reply with quote

Thanks....
I have to rewrite mine one function for the thing I want...
I will dive in to it... post it if I get it working..
Thanks for the help!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group