 |
 |
| View previous topic :: View next topic |
| Author |
Message |
proCCSC Guest
|
|
Posted: Tue Apr 10, 2007 7:15 am |
|
|
| 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
|
|
Posted: Tue Apr 10, 2007 7:39 am |
|
|
As Ttelmah said, I transmit 0xAA,
but I received : €€€
I transmit 0x55
but I receivede: €€€€€ |
|
 |
Ttelmah Guest
|
|
Posted: Tue Apr 10, 2007 8:13 am |
|
|
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
|
|
Posted: Tue Apr 10, 2007 8:25 am |
|
|
| 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
|
|
Posted: Tue Apr 10, 2007 8:33 am |
|
|
| 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
|
|
Posted: Tue Apr 10, 2007 12:34 pm |
|
|
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
|
|
Posted: Wed Apr 11, 2007 2:58 am |
|
|
| 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
|
|
Posted: Wed Apr 11, 2007 4:25 am |
|
|
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
|
|
Posted: Thu Apr 12, 2007 3:55 pm |
|
|
| 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?  |
|
 |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Apr 13, 2007 7:02 am |
|
|
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. |
|
 |
|
|
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
|