Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows API
#1
I was trying to show on my lcd when a contact on my WLM (Windows Live Messenger), I found that msn plus has a script option whitch i used to send mesages to LCDHype via window API (user32.dll) , after a few research, I could use VM_COPYDATA to send a string. Now is the problem, how to use thios message on LCDHype?? I can only se it on Status log.


Any help will be usefull.

Sorry my bad english ^^
#2
this message is used to add a status log entry so theres no easy way to get the messagein scripts. you can try to readout the log\statuslog.txt file with %System.ReadFile(). perhaps i should add a new function call for getting a status message?
Current stable version of LCDHype: 0.7.6
New plugin: Notepad++ Bookmark Manager
New music: Nordwise - Empire transition
#3
If you could do this to me, i will realy apreciate that, with msn plus scripting system i can send several useful mesages to lcdhype, and this will open a new way to send messages to lcdhype.

thx for your quick anser ^^
#4
Ok,I´ve started to use dlportio.dll to have directly acess to my display (16x2 HD44780), and i´m having problems with wiring compatibitly. on your shematic you use lcd pin 4 ( RS ) at parallel port pin 16 ( initialize ) and leave pin 17 for light control.

at shematic that i´m using, lcd pin 4 (RS) goes at parallel port pin 17 (Select-Printer), when I inicialize the lcd using this code:

CODE
init[0] = 0x0F; /* Init Display */
init[1] = 0x01; /* Clear Display */
init[2] = 0x38; /* Dual Line / 8 Bits */

outportb(CONTROL, inportb(CONTROL) & 0xDF); /* Reset Control Port - Make sure Forward Direction */

outportb(CONTROL, inportb(CONTROL) | 0x08); /* Set Select Printer (Register Select) */

for (count = 0; count <= 2; count++)
 {
  outportb(DATA, init[count]);
  outportb(CONTROL,inportb(CONTROL) | 0x01); /* Set Strobe (Enable)*/
  delay(20);                                 /* Larger Delay for INIT */
  outportb(CONTROL,inportb(CONTROL) & 0xFE); /* Reset Strobe (Enable)*/
  delay(20);                                 /* Larger Delay for INIT */
 }

outportb(CONTROL, inportb(CONTROL) & 0xF7);  /* Reset Select Printer (Register Select) */


What should I use at
outportb(CONTROL, inportb(CONTROL) | 0x08); /* Set Select Printer (Register Select) */

in order to use LCDHype shematic?
#5
initialize is bit 3 in the control register so it would be decimal 4.

btw, either i dont understand what you are doing or this peace of code is wrong because when you write 8hex to control port you will get 0V on pin 17 because its hardware inverted. if you look into the datasheet of the hd44780 the controller needs a 1 or 5V on the rs pin to write data to cgram or ddram.
Current stable version of LCDHype: 0.7.6
New plugin: Notepad++ Bookmark Manager
New music: Nordwise - Empire transition
#6
thx, i take a prety look at parallel port pins and hd44780 datasheet, and things started to aper at my lcd, and after lookng at dlportio.dll functions and using bitwise operators the things make some sense now. using javascript of msnplus system differs a little from the code above, but the logic is the same.

100% compatible with lcdhype shematics now ^^

I was using %System.ReadFile() to interface with lcdhype, but things could be easy if a function call for getting a status message tongue.gif

thx for help, sorry for annoying with my poor programing skills, just a begginer
#7
you can now send messages with WM_COPYDATA

/index.php?showtopic=4690...indpost&p=24169
Current stable version of LCDHype: 0.7.6
New plugin: Notepad++ Bookmark Manager
New music: Nordwise - Empire transition
#8
Thanks a lot my friend!!!!!
#9
do you also experience application crashes when shuting down lcdhype? a user reported it this way.
Current stable version of LCDHype: 0.7.6
New plugin: Notepad++ Bookmark Manager
New music: Nordwise - Empire transition
#10
Never happen with me.
#11
@acesso:

I would like to know if there has been any developemnet of your script with sending messages to your display. I am trying to create something similiar and would like to see if you have worked out your script any further?
#12
perhaps you should send him / her an email because 3 years have passed since he posted someting C:
Current stable version of LCDHype: 0.7.6
New plugin: Notepad++ Bookmark Manager
New music: Nordwise - Empire transition


Forum Jump:


Users browsing this thread: 1 Guest(s)