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

PIC18F26K80 IO problem

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



Joined: 28 May 2017
Posts: 83

View user's profile Send private message

PIC18F26K80 IO problem
PostPosted: Tue Jan 02, 2024 6:19 am     Reply with quote

Hey Thelmah

Thanks for helping in IC package.
I looked with thee microscopes, and I wanted to know which is pin 1, but I cant found any marking.
Now I know when i took the device out of the package.
I got help from NPX.
It is only in certain position when it is assembled, no marking.
You can look http://probyte.fi/product_orientation.jpg

==
I have some problems with your LCD driver.
I can't display 'c' and 'd' letters .
Finally I found that it is something in lcd_putc function.
When I took \c and \d out, it worked.
The picture is http://probyte.fi/lcd2.jpg

Here is my modified function:

void lcd_putc( char x ) {
fprintf(Debug,"\rA char %x",x); // sarjaliikenne debug
switch(x) {
case '\f' : lcd_send_byte(0,LCD_CLR_DISP); lcd_line=1; delay_ms(2); fprintf(Debug,"\ f Break ");break;
case '\n' : lcd_gotoxy(1,++lcd_line); fprintf(Debug,"\ n Break \r");break;
case '\b' : lcd_send_byte(0,LCD_MOVE_CURSOR_LEFT); fprintf(Debug,"\ b Break\r "); break;
//'case '\c' : lcd_send_byte(0,LCD_DISP_ON_CURSOR); fprintf(Debug,"\ c Break \r"); break;
//case '\d' : lcd_send_byte(0,LCD_DISP_ON_BLINK); fprintf(Debug,"\ d Break \r"); break;
case '\1' : lcd_send_byte(1,LCD_DEGREE_CHAR); fprintf(Debug,"\ 1 Break \r"); break;
default : lcd_send_byte(1,x);
fprintf(Debug,"\rB char %c %x",x,x); // Serial debug
break;
}
}

Surely you found something in my code fault.

Pekka
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jan 02, 2024 8:21 am     Reply with quote

It could be that 'cursor on/off and blink' are NOT part of that LCD module's command set.
While there is a loose 'standard' for LCD module, not all makers of all modules will have all functions,command or features.
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Wed Jan 03, 2024 3:35 am     Reply with quote

Why you have generated a second thread is annoying. Anyway the sheet
you posted is the specification sheet not the datasheet. The unit uses a
ST7066 controller and the full datasheet for this is at:
[url]
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwi4zbKW8sCDAxWKQUEAHZGbAsQQFnoECBIQAQ&url=https%3A%2F%2Fwww.sparkfun.com%2Fdatasheets%2FLCD%2Fst7066.pdf&usg=AOvVaw2wR53x8qkO-cCUlbacq18M&opi=89978449
[/url]

As I said, pin1 is not marked, but if you look carefully at the top of the
package, you will find one edge is just fractionally beveled. This edge
marks pins 1...4.

Now what you have posted is not the lcd_putc from the driver we
suggested. Use flex_lcd. It works.

The unwanted inverted comma at the start of your '\c' case may well be
what is making it not work.
pekka1234



Joined: 28 May 2017
Posts: 83

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 5:10 am     Reply with quote

Thelmah

I finally got from NPX an explanation, where the pin 1 is in their driver,
Look http::/probyte.fi/product_orientation.jpg.
They say it has now identification on the device, only which way it is set to package.
They said that TME has a wrong specification of the device, it is from Phillips.
now NPX made them.
I must help TME.

==
The driver flex_lcd works, but it has some failures, but I have corrected them.
Thank you for showing be a right place.

Pekka
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 5:21 am     Reply with quote

That is insane.
Your link does not work, but not having any directional identifier would
not work on a lot of production lines. The systems we use to build all do
a laser check on the orientation when it is placed.
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 6:38 am     Reply with quote

I don't understand why spend the time to replace the LCD controller SMT chip ? LCD modules are really, really inexpensive today ! Even if the chip is free, the labour cost to remove/replace far exceeds the price of a new module.
pekka1234



Joined: 28 May 2017
Posts: 83

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 6:41 am     Reply with quote

The right place is https://www.probyte.fi/product_orientation.jpg

Pekka
pekka1234



Joined: 28 May 2017
Posts: 83

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 6:43 am     Reply with quote

I use normal LCD modules, but there is not a real datasheet
https://www.tme.eu/en/details/rc0802a-biy-esx/lcd-alphanumeric-displays/raystar-optronics/
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 7:42 am     Reply with quote

looked at your link....
ST7066U is the controller used for that LCD display
so the link Mr. T posted few answers up IS the datasheet that will contain the information you need.
I'm 100% sure the 'flex_LCD driver' will work for you.
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 10:15 am     Reply with quote

and just to explain further, if you go to the Raystar site itself, select that
module, it states that the control chip is the ST7066, and recommends
you look at the datasheet for that for programming data.
Hence I did a search for that datasheet and posted the simplest link.

This is common. Manufacturers of 'modules' like this do not have the
right to post the actual datasheets for the chips used, since they are copyright
from the chip manufacturer. So instead they refer you to these.
It's in the specification sheet as well. First page:
"IC:ST7066U".
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