Author |
Message |
Topic: GENERATING PWM USING THE TIMER |
akin54
Replies: 3
Views: 15259
|
Forum: General CCS C Discussion Posted: Fri Mar 04, 2022 1:50 am Subject: GENERATING PWM USING THE TIMER |
Yes, now I see. I made the MCLR pin a hardware button. |
Topic: GENERATING PWM USING THE TIMER |
akin54
Replies: 3
Views: 15259
|
Forum: General CCS C Discussion Posted: Fri Mar 04, 2022 1:49 am Subject: GENERATING PWM USING THE TIMER |
#include <main.h>
#FUSES NOMCLR //MCLR = A3 pin
#int_timer2
void timer2 ()
{
output_high(pin_a5);
delay_us(12);
outp ... |
Topic: GENERATING PWM USING THE TIMER |
akin54
Replies: 3
Views: 15259
|
Forum: General CCS C Discussion Posted: Fri Mar 04, 2022 12:27 am Subject: GENERATING PWM USING THE TIMER |
Hello everyone.
I want to generate pwm from this processor (PIC12F683) without using the ccp1 leg. I want to use the GP5(A5) pin for this operation. The electronic card circuit I have drawn does not ... |
Topic: Generate pwm square wave at 300 khz frequency PIC18F47Q43 |
akin54
Replies: 1
Views: 10908
|
Forum: General CCS C Discussion Posted: Thu Dec 09, 2021 11:51 pm Subject: Generate pwm square wave at 300 khz frequency PIC18F47Q43 |
SETUP_PWM1(PWM_ENABLED | PWM_CLK_FOSC | PWM_CLK_DIV_BY_1);
set_pwm1_period(24);
set_pwm1_duty(1,12) ... |
Topic: PIC18F47Q43 SPI communication problem |
akin54
Replies: 10
Views: 27306
|
Forum: General CCS C Discussion Posted: Fri Nov 12, 2021 1:55 pm Subject: PIC18F47Q43 SPI communication problem |
Using #USE SPI, you should be using spi_xfer, not spi_read or spi_write.
Basically the spi_read, write and setup_spi, are the 'old' commands.
#USE, with spi_xfer are the new commands. You should not ... |
Topic: PIC18F47Q43 SPI communication problem |
akin54
Replies: 10
Views: 27306
|
Forum: General CCS C Discussion Posted: Fri Nov 12, 2021 8:23 am Subject: PIC18F47Q43 SPI communication problem |
2nd spi write data is 0, so pot wiper would be zero ?
Have you got the pot wired to VDD and VSS ?
What speed is the PIC ?
Does the PIC flash an LED at 1Hz ?
Is the spi 'mode' correct for that dev ... |
Topic: PIC18F47Q43 SPI communication problem |
akin54
Replies: 10
Views: 27306
|
Forum: General CCS C Discussion Posted: Fri Nov 12, 2021 7:47 am Subject: PIC18F47Q43 SPI communication problem |
#use spi (MASTER, CLK=PIN_D0, DI=PIN_D3, DO=PIN_D1, BAUD=4000000, MODE=0, BITS=8, STREAM=SPI_1)
setup_spi(SPI_MASTER | SPI_H_TO_L );
output_low(pin_d0);
spi_write(0x ... |
|