Dangerous Prototypes

Other projects => Past projects => #twatch network LCD backpack => Topic started by: limbo on November 14, 2009, 08:07:19 pm

Title: LCD Smartie - Tests, Suggestions, Tips, Requests
Post by: limbo on November 14, 2009, 08:07:19 pm
I'm driving #twatch by using LCD Smartie which boost the functionallity of the device.

Since today I discovered two (possible) bugs when using the program.
1. when I'm changing the contrast on the LCD Smartie program settings some garbage are appearing on the screen. :(
2. Custom characters are not appearing correctly on the screen. This limits the screen usage  since lot of things can be created by utilizing custom characters.

Can somebody confim check the above?
Title: Re: LCD Smartie - Tests, Suggestions, Tips, Requests
Post by: bluesign2k on November 14, 2009, 11:50:55 pm
1. adjustable contrast is not supported so the twatch wont understand the commands being sent... hence the garbage on the screen. that said, providing there's some spare pins on the PIC then theres nothing stopping you adding a digital pot and a few lines of code... it shouldn't be all that hard and would be quite a cool addition

2. I haven't actually had time to try my twatch yet but I can't see why the custom characters wouldn't show up properly. do all custom characters fail or is it just odd ones?
Title: Re: LCD Smartie - Tests, Suggestions, Tips, Requests
Post by: Scorpia on November 15, 2009, 08:10:45 am
shouldnt need a digital pot for contrast.
Just a 5v tolerant pin and some pwm should be able to do it.
Title: Re: LCD Smartie - Tests, Suggestions, Tips, Requests
Post by: ian on November 15, 2009, 09:30:05 am
I'll double check the custom character code, I've never properly tested it other than implementing it according to spec.

Here's the command processing code:
http://code.google.com/p/dangerous-prot ... rver.c#169 (http://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/trunk/%23twatch/source/twatch-v0b/LCDTCPServer.c#169)

Ignore the comment that the custom character codes doesn't do anything yet, it does:

Code: [Select]
case CUSTOM_CHARACTER: //9 parameters (character #, 8 byte bitmap)
     LCD_WriteCGRAM(par[0]);//write character address
     for(i=1; i<9; i++) LCD_WriteRAM(par[i]); //send 8 bitmap bytes
     break; //do nothing, no special characters yet
Title: Re: LCD Smartie - Tests, Suggestions, Tips, Requests
Post by: ian on November 16, 2009, 07:36:05 pm
@limbo - Here's a new firmware that explicitly exits CGRAM (character gen ram) after a character is written. I think that was the problem, LCD Smartie entered CGRAM, wrote 8 characters, and then sent text. I haven't tested because I don't have anything that uses custom characters handy, but I think it will solve the problem. If it works for you, would you please let me know.

Code: [Select]
case CUSTOM_CHARACTER: 			//9 parameters (character #, 8 byte bitmap)
LCD_WriteCGRAM(par[0]); //write character address
for(i=1; i<9; i++) LCD_WriteRAM(par[i]); //send 8 bitmap bytes
LCD_ExitCGRAM();
break;

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00992068536session_write_close ( )...(null):0
20.01022200128ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01022200904Database_MySQL->query( ).../DatabaseHandler.php:119
40.05402339632Database_MySQL->error( ).../Db-mysql.class.php:273