free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  1 [2]
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
ExperimenterUK
Tue Nov 25 2008, 08:19AM
 User Offline
Registered Member #9602
Joined: Tue Aug 05 2008, 04:15PM

Posts: 207
Thanked 38 times in 37 posts
Actually I think the standard NMEA baud rate is 4800



Learning all the time
Back to top


monika
Tue Nov 25 2008, 11:40PM
 User Offline
Registered Member #7028
Joined: Fri Apr 04 2008, 03:31AM

Posts: 16
Thanked 0 times in 0 posts
My receiver is working fine with PC com port and it is giving NMEA format in the hyperterminal. There is no such kind of problem.

Firstly I want to read my data (say my data is: hello) in an array and then transmit it.
That's why i am using 9600 baud rate.
Back to top


Ajay
Wed Nov 26 2008, 11:39AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4049
Thanked 754 times in 713 posts
monika is your hardware able to send data to terminal?

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


sashijoseph
Wed Nov 26 2008, 06:56PM

 User Offline
Registered Member #5870
Joined: Mon Feb 04 2008, 06:26PM

Posts: 651
Thanked 141 times in 134 posts
In your putch and getch functions,are the TXIF and RCIF flags cleared by hardware?
Don't you have to clear them explicitly? What does the datasheet say?

And have you tried Ajay's and ExpUK's suggestions...just send a string and see if you can receive it in hyperterm.

If it works,then try getting your baudrate down to 4800.

Let there be music........
Back to top


monika
Wed Nov 26 2008, 09:19PM
 User Offline
Registered Member #7028
Joined: Fri Apr 04 2008, 03:31AM

Posts: 16
Thanked 0 times in 0 posts
In my code, TXIF and RCIF flags are cleared implicitly. I am using PIC 16F690. There is no need to clear the flags in it.

I am able to send a character at a time using my hardware and getting the output in hyperterminal with baudrates 9600 and 4800. The problem occurs when I work with string.
Back to top


ExperimenterUK
Fri Nov 28 2008, 12:17PM
 User Offline
Registered Member #9602
Joined: Tue Aug 05 2008, 04:15PM

Posts: 207
Thanked 38 times in 37 posts
Did you try the code I suggested in an earlier post ?

>I would create a test program, something like this just to see what I get.
>char testMsg[]="Test***";
>int n=0;
etc

It would be safer to introduce a small delay before sending the string
to allow the internal oscillator to stabilise.
Better still use an external crystal.


Learning all the time
Back to top


monika
Thu Dec 04 2008, 10:35PM
 User Offline
Registered Member #7028
Joined: Fri Apr 04 2008, 03:31AM

Posts: 16
Thanked 0 times in 0 posts
yes I have tried your code and it is working fine. I have introduced a delay before sending the string as:

do
{
read=get_ch();
msg_rec[i]=read;
i++;
delay_ms();
}while(i<20);

msg_rec[i]='\0';

while(msg_rec[j]!='\0')
{
putch(msg_rec[j]);
j++;
}

I read a character and then store it in array, after that I have given a delay to stabilize the internal oscillator . only then i read another character.

but still there is no output in the hyperterminal.
Back to top


ExperimenterUK
Thu Dec 04 2008, 11:45PM
 User Offline
Registered Member #9602
Joined: Tue Aug 05 2008, 04:15PM

Posts: 207
Thanked 38 times in 37 posts
monika wrote ...

yes I have tried your code and it is working fine.

Do you mean you reset the PIC and it prints out the test message in hyperterminal ?

The delay I mentioned was between reset and starting to print the test string,
a few milliseconds, just in case the internal oscillator took a while to stabilise.

Can you post a diagram of how these items are connected ?







[ Edited Thu Dec 04 2008, 11:50PM ]

Learning all the time
Back to top


Go to page  1 [2]  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems