CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

problem of RS232 , thanks for all the help coming...
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
proCCSC
Guest







PostPosted: Tue Apr 10, 2007 7:15 am     Reply with quote

Can you tell me what software you use for transmit and receive data for serial port?? I use Free serial Port Monitor to see the data transmit and received, I use another software to open the port and transmit les datas . It's normal or no?
progCCSC
Guest







PostPosted: Tue Apr 10, 2007 7:39 am     Reply with quote

As Ttelmah said, I transmit 0xAA,
but I received : €€€

I transmit 0x55
but I receivede: €€€€€
Ttelmah
Guest







PostPosted: Tue Apr 10, 2007 8:13 am     Reply with quote

What are the hex values being received for each of these?. It looks like you are actually 'seeing' something like four characters for each, which suggests that you are only running at perhaps 1/4 the clock rate you expect. However if this was the case, I'd expect the delays to be longer than expected...

Best Wishes
Guest








PostPosted: Tue Apr 10, 2007 8:25 am     Reply with quote

Ttelmah wrote:
What are the hex values being received for each of these?. It looks like you are actually 'seeing' something like four characters for each, which suggests that you are only running at perhaps 1/4 the clock rate you expect. However if this was the case, I'd expect the delays to be longer than expected...

Best Wishes


In the format HEX: there are only 80 00 80 ... there are not other value
progCCSC
Guest







PostPosted: Tue Apr 10, 2007 8:33 am     Reply with quote

Ttelmah wrote:
What are the hex values being received for each of these?. It looks like you are actually 'seeing' something like four characters for each, which suggests that you are only running at perhaps 1/4 the clock rate you expect. However if this was the case, I'd expect the delays to be longer than expected...

Best Wishes


Can you read what I haved posed in the first page , please? I can't deal with this problem,
Ttelmah
Guest







PostPosted: Tue Apr 10, 2007 12:34 pm     Reply with quote

Seriously, do what I said, rather than just part of it.
Start with a really small program to toggle one pin, and time it for real. Make the time long (perhaps 10000mSec), and time how long the pin stays in one state with a stopwatch, rather than counting. I still don't think your processor is really running at the rate you think.
Now '80 80 80' is what I'd _expect_ to see, if the processor is only really running at a small fraction of the rate you think.

Best Wishes
Guest








PostPosted: Wed Apr 11, 2007 2:58 am     Reply with quote

Ttelmah wrote:
Seriously, do what I said, rather than just part of it.
Start with a really small program to toggle one pin, and time it for real. Make the time long (perhaps 10000mSec), and time how long the pin stays in one state with a stopwatch, rather than counting. I still don't think your processor is really running at the rate you think.
Now '80 80 80' is what I'd _expect_ to see, if the processor is only really running at a small fraction of the rate you think.

Best Wishes


thank you ; I have done what you said, and there a another problem:
I set baud=9600 in the programme, but for receive in the PC, I have to set baud=1200 in Serial Port Ternimal.
Ttelmah
Guest







PostPosted: Wed Apr 11, 2007 4:25 am     Reply with quote

So what time do you get if you 'do what I say' with a stopwatch?. The result you are seeing, says that the chip is runnng at 1/4 the rate you think.

Best Wishes
progCCSC
Guest







PostPosted: Thu Apr 12, 2007 3:55 pm     Reply with quote

Ttelmah wrote:
So what time do you get if you 'do what I say' with a stopwatch?. The result you are seeing, says that the chip is runnng at 1/4 the rate you think.

Best Wishes


thanks, and....I feel a little sorry....I said I did what you said , to measure the clock, but I havn't did it in your method, because I haven't LED.
I measured the pin clk directly , the result is 12MHz. I thought it's also a resolution, and what's your opinion? Smile
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Fri Apr 13, 2007 7:02 am     Reply with quote

So the clock should be 20MHz and you get 12MHz by measuring the clk pin "directly". What do you mean by "directly"? If you have a mis-behaving crystal clock it may be very unstable and if you put a scope probe on the crystal pins you may alter the oscillation frequency still more. Remember the crystal is looking for about 18pF and a typical scope probe adds 10pF itself. If you use a DVM lead to a frequency counter the loading on the crystal will be even worse. It is much better to use software to divide the clock down to some low speed driving a port pin that can be measured without getting near the suspect crystal.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group