|
|
Hi,
I doing a project using Atmel 89c51 and Keil for programming. In this, one module is to display a 4-digit number using seven segment display and a BCD decoder. I split the number in to separate digits using modulo and division operation. The first digit gets displayed correctly but the other digits are not displayed correctly. For eg: if my no is 0634 it gets displayed as 2704. This is the pseudo code
int MilliSeconds=0;
unsigned int Digit;
unsigned int d1;
int count=0;
int choice=0;
void InitStartTimer(void)
{
TCON=TCON & 0xCF; //clear timer0 flags
TMOD=TMOD & 0xF9; //enable timer0 without changing timer1 setup
TL0=0xC2; //Load the delay msb
TH0=0xFB; //Load the delay lsb
TR0=1; //start timer
}
void TimerIntr(void) interrupt 1 using 3
{
TR0=0;
if(count>=1)
{
P3_7=1;
MilliSeconds+=1;
}
else
count++;
if(MilliSeconds==20)
{
switch(choice)
{
case 0:
ch1=P1;
ch2=P2&0x0F;
Digit=(P2*256)+P1;
d1=Digit % 10;
Digit=Digit/10;
d1=d1|0x10;
P0=d1;
choice++;
break;
case 1:
d1=Digit%10;
Digit=Digit/10; d1=d1|0x20;
P0=d1;
choice++;
break;
case 2:
d1=Digit%10;
Digit=Digit/10;
d1=0;
d1=d1|0x40;
P0=d1;
choice++;
break;
case 3:
d1=Digit%10;
Digit=Digit/10;
d1=0;
d1=d1|0x80;
P0=d1;
choice++;
break;
case 4:
choice=0;
break;
}
MilliSeconds=0;
}
InitStartTimer();
}
The first digit gets displayed but after the division operation things get messy. Does divsion doesnot work in keil.I am a beginer. Expect ur help
Thanks
Cool Ju
|
|
|
|
|
I need to develop a directshow client application to capture images from a camera device driver. Any suggestions ,or samples codes on tutorials in this would be highly appreciated
Regards
hymn
|
|
|
|
|
hi, i creating an aplication for pocket pc that basicaly show ur position on a map,and using a gps system show u moving on the map. The problems is that every single thing that i find to control map objects works for windows ce, and my pocket has windows mobile 2003. if someone knows what activex or anything else i can use for manage the map, please tell me. I´m using VB .NET
|
|
|
|
|
Hi all,
I try to using c# and programming the CEMAPI(by using VC++) in pocket pc 2003 to retrieve
the emails from the pocket pc. But after several days trials, I still
can't get the receipent and the body of the emails(I can only retrieve
the subject of the emails). Do anyone have the same experience as me ? I
just wonder there are system bugs in the pocket pc MAPI.
Thanks
|
|
|
|
|
I am developing software on WinCE, but I don't know what 'CE' of WinCE mean?
thank you!
your friend:bobi
|
|
|
|
|
There are a number of theories out there on this subject. Some say CE stands for "Consumer Electronics". Others say it is meaningless.
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
I deeply believe it is: Coelacanth Embedded. I saw the fish deep inside the binary sources
Don't know much < I, don't care much > I, while I am here ... just be happy
|
|
|
|
|
Hi all,
I p/Invoke a VC++ dll in C#, but there is serious memory leak, how can I fix the memory leakage by the VC++ dll caused by P/Invoke ?
(the leakage seem not come from the internal C++ code inside the dll, so I suspect it come from the loading and unloading of the dll in C#)
Thanks
|
|
|
|
|
|
I found this example on how to program a software input panel (SIP) at this site.[^] I have eVC++ and all the service packs. My goal is to try and modify the SIP provided off of the site, but my biggest problem is i can't get it running in the first place. I can compile the code, but i can't get the SIP to work on the emulator or on My Axim X50v. If someone could tell me how to get it working i would really appriciate it.
I understand form his site that i have to change the registry to get be able to use the SIP, but the registry value is never placed on my PDA or i don't know what to copy to where.
thanks
|
|
|
|
|
Hi,
I am currently writing an application in pocket pc 2003. The application
need to get those emails related to the application(e.g. email from a specified contact) from the default email client in pocketpc and store them in the application. But I face a design consideration problem,
1. Are most users use the default email client in pocket pc when they
receive email wirelessly ? If not, my application need to connect to the other third-party email client also, but how I program the application to connect to diverse set of pocket pc email clients available on the market ? Are there a common standard for doing this ?
2. My application need to send email from the pocket pc, the current
method is to send the email message to the default email client in the pocket pc, and the user click the send/receive button on the default client later. But this seem not quite user-friendly to the users. Original, I intend to write code so that the application directly send email to the smtp server, but the coding seem quite complex and need to handle many cases for the smtp server protocol handshaking. So are there any better methods ?
Thanks
|
|
|
|
|
hi all
i'm getting a problem while running my app in emulator. the emulator works fine but not my application. when i run my application it is not able to connect to the emulator. it says "timed out can not connect to emulator"
does any one have any idea abt this
|
|
|
|
|
i trying to write a code to disable toolbar start , run mstsc40.exe
and to login Automatically "mstsc40.exe"
using System.Diagnostics;
i can't use Process object !!!
thx
|
|
|
|
|
A rather tricky question: Is is possible to design a program to lay on top of two other programs in order to be able to control the audio from these 2 programs. I want to be able to mute the first programs audio so that the other can use the speaker, and the unmute so that the first program uses the speaker. Does anyone know if this is possible? If so, could someone provide me with sample code for VB.net?
Best regards
Mikkel
|
|
|
|
|
Hi all, i'm currently working on a school project and are very new in this.
The code below is something i had modify:
BOOL CCheckBookFile::New()
{
CString strFilter;
CString allFilter;
CString strTitle;
CString OpenFilter;
OpenFilter ="Text File (*.txt)|*.txt|";
OpenFilter += "RTF (*.rtf)|*.rtf|";
OpenFilter += "ASC (*.asc)|*.asc|";
OpenFilter += "Word Document (*.doc)|*.doc|";
OpenFilter += "All Files (*.*)|*.*||";
CFileDialog dlg(FALSE, NULL, TEXT("\\My Documents\\NewFile"), OFN_FILEMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, OpenFilter, NULL);
strTitle.LoadString(IDS_FILE_NEW);
dlg.m_ofn.lpstrTitle = strTitle;
if (dlg.DoModal() == IDCANCEL)
return FALSE;
if (m_file.m_hFile != (UINT)CFile::hFileNull)
m_file.Close();
if (!m_file.Open(dlg.GetPathName(), CFile::modeCreate | CFile::modeReadWrite | CFile::modeNoTruncate | CFile::typeText ))
{
AfxMessageBox(CString((LPCTSTR)IDS_MESSAGE5));
// Call open again
if (!New())
return FALSE;
else
return TRUE;
}
return TRUE;
}
well, there are 184kb in the save file, and it's in .txt format.
but when i open it, it will show some strange words.
But when i use my program to open it, it seems fine.
Does anyone know how to change it to a readable .txt file?
Thanks
And by the way, i'm using pocket word to open the .txt files that i had saved.
|
|
|
|
|
It sounds to me like you are having a problem converting between unicode and ascii. All strings in wince are unicode (ie 2 bytes per character) whereas strings on a normal pc are ascii (1 byte per character). It looks like your program is writing and reading directly from windows ce strings which means your text file is probably in unicode, and pocket word is probably trying to open them in ascii format.
You can check this out by using a program like ultraedit to view the file and see if it is indeed in unicode or ascii.
Kind Regards
|
|
|
|
|
hi hterry61, thank you for the reply
I'm using Embedded C++ ver3.0 and running on an emulator.
Can i install the "ultraedit" in it?
And if say i want it to save to .txt format, so that it can be open in pocket words, do i have to change it to unicode? If so, how can i change the codings?thank you
|
|
|
|
|
if i want to open the saved file in pocket word, do i have to save it in ascii format in order to view the files?
I can view properly in my program, but got funny wordings when open in pocket words.
thanks
|
|
|
|
|
http://www.ultraedit.com
Put this trial software on your computer, transfer your "text" file to your pc and try to open it. Right click on the file that opened and go to "Hex Edit". This will show you exactly what is happening. My suspicion is that you will be getting 00 xx 00 xx 00 xx. This is because the first byte of every unicode will be 00 as it only requires the second byte for your ascii characters.
What you need to do is get your program writing and reading so that your data is xx xx xx instead.
If your "text" file is already writing as xx xx xx, then it is the reverse problem that you have.
There are plenty of resources on the web to show you how to do this.
for example:
http://www.developer.com/net/net/print.php/3304241
Good Luck!
|
|
|
|
|
Hi all,
I am wondering how to get a CCeSocket working properly from a separate user-interface thread. The trouble I am having is that if I use the CCeSocket::Send(pData, nSize) command in the main thread, I can send things fine, but since it is a blocking call I lose control of my GUI wile it is sending.
I instead call this from a second user-interface thread that I have running in the background, but it ALWAYS stops at 16384 bytes (16K). It is like it is waiting for some message from the server that it never receives. (Coincidentally, the same thing happens if you use CAsyncSocket::Send(pData, nSize) on my CE platform)
My thought is that the CCeSocket Monitoring thread is sending messages to the main thread instead of my second user-interface thread. Any thoughts on how I can fix this?
Thanks
Terry
|
|
|
|
|
1. Try insert Sleep(300) somewhere in the code before you call the function. It usually help.
2. Don't forget to use critical section, multithreaded application is a tricky business.
Cheers,
Yongki C. Andyka
Adisasta
Don't know much < I, don't care much > I, while I am here ... just be happy
|
|
|
|
|
I want to play a flash movie (.swf) in pocket pc for my application using vb .net. Whenever the user click a hyperlink, the application can play flash movie.
I have flash player. But I don't know whether I can call Pocket IE to run the flash player to play the movie.
Could anyone tell me whether it can do or not?
if yes, would you mind tell me how can i do? need any lib or something?
Thanks a lot!!
|
|
|
|
|
Hi,
could anyone please help me, how to pass command line argument to my app?
my code is as follows:
<br />
#include "stdafx.h"<br />
<br />
int WINAPI WinMain(HINSTANCE hInstance,<br />
HINSTANCE hPrevInstance,<br />
LPTSTR lpCmdLine,<br />
int nCmdShow)<br />
<br />
{<br />
if (*lpCmdLine == 'test'){<br />
MessageBox(NULL, TEXT("OK"), TEXT("Result"), MB_OK);<br />
}<br />
else {<br />
MessageBox(NULL, TEXT("NotOK"), TEXT("Result"), MB_OK);<br />
}<br />
<br />
return 0;<br />
}<br />
The problem is, that it always goes to "else"...
Thank You
Martin
|
|
|
|
|
Use
if(wcscmp(lpCmdLine, _T("test")) == 0)
for the comparison test.
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|