Author |
Message |
Topic: PWM and RS232 conflict |
bcptdtptp
Replies: 13
Views: 33360
|
Forum: General CCS C Discussion Posted: Mon Apr 26, 2021 10:53 am Subject: PWM and RS232 conflict |
Glad it worked!
I actually expressed some concern about that line in the original post haha.
I was concerned that there will be conflicts between using the #use statements and the setup_timer_2 ... |
Topic: PWM and RS232 conflict |
bcptdtptp
Replies: 13
Views: 33360
|
Forum: General CCS C Discussion Posted: Mon Apr 26, 2021 9:37 am Subject: PWM and RS232 conflict |
Are you still doing setup_timer_2?
I've never had to do that to make #use pwm work
I took out the "setup_timer_2" and now both PWM and RS232 worked!!!!!!!
Thank you
BTW, r ... |
Topic: PWM and RS232 conflict |
bcptdtptp
Replies: 13
Views: 33360
|
Forum: General CCS C Discussion Posted: Mon Apr 26, 2021 8:59 am Subject: PWM and RS232 conflict |
Also, when using a hardware UART, unless you add your own error handling
you should always have 'ERRORS' in your #USE RS232., This is vital
particularly in this case.
Why?. If the UART receives mor ... |
Topic: PWM and RS232 conflict |
bcptdtptp
Replies: 13
Views: 33360
|
Forum: General CCS C Discussion Posted: Mon Apr 26, 2021 7:27 am Subject: PWM and RS232 conflict |
Hi dluu13 and Ttelmah,
Thank you so much for the comments and generous help! Today I'll modify the code and add interrupt handler for timer 2 as well as the RS232 error.
For PWM, I actually had ... |
Topic: PWM and RS232 conflict |
bcptdtptp
Replies: 13
Views: 33360
|
Forum: General CCS C Discussion Posted: Sat Apr 24, 2021 9:05 pm Subject: PWM and RS232 conflict |
Hi Ttelmah, thanks for the detailed explanation about the errors, I will add it to the code.
I came across a post from you several years ago stating timer2 not needed for the own, but it does seem ... |
Topic: PWM and RS232 conflict |
bcptdtptp
Replies: 13
Views: 33360
|
Forum: General CCS C Discussion Posted: Fri Apr 23, 2021 5:40 pm Subject: PWM and RS232 conflict |
Hi temtronic, thank you so much for your comments. I actually got this ISR from a sample code long time ago. I will rework on the code next week according to your comments. |
Topic: PWM and RS232 conflict |
bcptdtptp
Replies: 13
Views: 33360
|
Forum: General CCS C Discussion Posted: Fri Apr 23, 2021 2:00 pm Subject: PWM and RS232 conflict |
Hi all,
I'm using PIC18F57K42 and CCS compiler 5.101.
I was trying to setup pwm and serial port. What I found was if I enable the INT_TIMER2, then the pwm works but the serial port not. Seems it ... |
|