Author |
Message |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 10:24 pm Subject: Problem with serial transmit and receive... |
4 PWM output, 1 ADC channel with data transmitting, 9 char inputs
- Data from ADC obtained correctly every second. Char input does NOT work...
No, you don't know that. You think the character inp ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 9:21 am Subject: Problem with serial transmit and receive... |
Could I assume that you have understood and applied my last post?
You can eventually post the whole code if it is well indented and commented.
Matro
Oh sorry I missed out on your post as I was ty ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 9:10 am Subject: Problem with serial transmit and receive... |
Alright, regarding where the problem lies, I don't really know how to say cos I don't know where it lies actually. So I'll just describe what I observed. Now the latest scenario is like this:
1 PWM ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 6:42 am Subject: Problem with serial transmit and receive... |
Sorry i forgot to tell that some changes that I made.
#define LOOPCNT2 100
.........
setup_timer_1( T1_INTERNAL | T1_DIV_BY_1)
to this
#define LOOPCNT2 10
..........
setup_time ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Mon Apr 28, 2008 11:28 pm Subject: Problem with serial transmit and receive... |
Thanks. I put the "case 'a'" code back in.
I first compiled it with vs. 4.071 (the latest version), and it begins with
a pulse on pin C0. The frequency is 50 Hz and the pulse width is 1 ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Mon Apr 28, 2008 2:33 am Subject: Problem with serial transmit and receive... |
Yeah its version 4.017. I'm doing this in a lab computer so i don't think i'm allowed to update the versions without the staff permissions.
Thanks a lot for willing to help. Really in need of help ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Sun Apr 27, 2008 9:57 pm Subject: Problem with serial transmit and receive... |
Thanks for the pointers PCM. Sorry for did not posting up a shorter and compilable version. I've reduced the length into just for one channel, one character input with one channel of ADC. Hope it is s ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Sun Apr 27, 2008 8:40 pm Subject: Re: rs232 ambiguiti |
tray adding this line
#use fixed_io(C_OUTPUTS=PIN_C7)
Hi, I have tried it and it did not make a difference. |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Sun Apr 27, 2008 5:59 am Subject: Problem with serial transmit and receive... |
I've tried take out the lines and slowly run one by one to find out the problem. I found out that its the printf line that is causing the PIC to behave weird when receiving input char. Is there better ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Sat Apr 26, 2008 9:46 pm Subject: Problem with serial transmit and receive... |
It is actually supposed to work like this. When power is turned on, the servos move to their home positions, or lets just focus on only one servo. The output pin which provides the PWM signal is PWM_P ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Sat Apr 26, 2008 9:04 pm Subject: Problem with serial transmit and receive... |
The only thing left that sets width01 is in the main() function which sets it by default into its home position. Here it is:
void main()
{
init_main();
Initialize_I ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Sat Apr 26, 2008 10:59 am Subject: Problem with serial transmit and receive... |
Looking for help here. Anyone can offer some advice on how to solve this problem? |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Fri Apr 25, 2008 10:47 pm Subject: Problem with serial transmit and receive... |
So now we understand that the PIC is able to read characters from the PC just fine. The real problem is that the servo is not moving correctly. But you are now showing us any code that moves a s ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Fri Apr 25, 2008 1:04 pm Subject: Problem with serial transmit and receive... |
Hi Scott, I have tried removing the other char inputs except for one and it still behaves the same. Still I'm getting values displayed on PC but can't send in command from PC.
OK, so you have a f ... |
Topic: Problem with serial transmit and receive... |
soong2020
Replies: 42
Views: 29419
|
Forum: General CCS C Discussion Posted: Fri Apr 25, 2008 8:20 am Subject: Problem with serial transmit and receive... |
That is not what I suggested. You were complaining that your full PIC program was unable to both send and receive serial data at the same time. So I suggested using your full PIC program, but chan ... |
|