Serial comm between uC and PC...

Status
Not open for further replies.
Are you sure you have a 20Mhz crystal... It seems as the baud is out....
 
Here is my project WITH UART stimulas.
 

Attachments

  • ritesh3.zip
    32.1 KB · Views: 156
anyway, i have figure out the main cause of problem it was wrong parameter mention on usb module as i said when i short both terminal it work after that i have removed the rx wire from uC and changed tx to tx pin of usb module then it work fine there is no error..............
 
First start the debugger.

Choose MPSim
The output window gains a tab..

Then go back to the debugger menu and "Settings" is at the bottom.


Finally open the UART I/O tab.


Now you can choose a register injection file to use for input ( The serial.txt file is in the zip file )
And choose output to window.

NOTICE** The stimulus file has "wait" parameters as the input is FAR too fast for serial polling...
 
Hi,

I am working more on UART passing string and not suck with if cond to do a task......
the problem is that when any key is press it work not follow the cond , why??
Code:
if(ch=='a');
{

f =  'a' ;
     HSerout(f);
__delay_ms(250);
 

Can you re-phrase this, I don't understand your problem...
 
Can you re-phrase this, I don't understand your problem...

OK, I am trying to make condition based transmission from let say if 'A' is pressed in keyboard it wil show "jhdghgk" and if 'B' is pressed it should show "kjyhjkdqwefjgtjk" like this....
but the problem is that when i do this on pressing any of key it work but it should match the key to condition then it should show the result this is what i am asking...
 
[MODNOTE]Deleted Off Topic[/MODNOTE]
 
Last edited by a moderator:
[MODNOTE]Deleted Off Topic[/MODNOTE]
 
Last edited by a moderator:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…