Вы находитесь на странице: 1из 2

More Next Blog» Create Blog

Electronics Note
This blog provides electronic circuits specially based on PIC microcontrollers and Arduino boards

Home Arduino Projects PIC18F4550 Projects PIC16F877A Projects PIC16F84A Projects PIC12F Series Projects More

Programmers PIC Projects with CCS PIC C About Blog

Ads by Google Binary Converter DC DC Converter Circuit PWM

CATEGORIES: Ads by Google

7 Segment (5) Converter Signal


Arduino (15)
DC Motors (11) Frequency Converter
DHT11 (11)
Search :
DHT22 (4)
EEPROM (1) Search
LCD (23) Translate
LED (17)
Microcontroller (32) Select Language
mikroBasic (1) Powered by Translate
MikroC (8) Archive:
PIC12F1822 (10)
Ads by Google Converter Pic Code Converter Converter And November (18)
PIC12F615 (5)
Tuesday, November 17, 2015 Popular Posts:
PIC12F629 (2)
PIC12F675 (2) DHT11 Proteus Simulation
PIC12F683 (3) PIC12F615 A/D Converter and PWM Modules
Cd-Rom 3 phase Sensored
PIC16F84A (12)
The Analog-to-Digital Converter (ADC) allows conversion of an analog input signal to a 10-bit binary BLDC Motor Arduino
PIC16F877A (26) Controller
representation of that signal. This device uses analog inputs, which are multiplexed into a single sample
PIC16F887 (2)
and hold circuit. The output of the sample and hold is connected to the input of the converter. The Cd-Rom Brushless DC
PIC18F4550 (14)
converter generates a 10-bit binary result via successive approximation and stores the conversion result Motor Control
Programmer (4) into the ADC result registers (ADRESL and ADRESH).
Proteus (12) The PWM mode generates a Pulse-Width Modulated signal on the CCP1 pin. PIC16F877A Projects
Real Time Clock (8) Example:
IR Remote Control Based
Remote Control (12) This example shows how to use both A/C and PWM modules. On PIC Microcontroller
Schematic (8) The following circuit schematic shows an Led connected to GP2 which is the PWM output of the
Sensor (15) PIC12F615 and a potentiometer connected to GP0 (AN0).
First the microcontroller reads the analog value on ANO then convert it to digital with a resolution of 10-
Software (3)
bit, this 10-bit resolution needs to be converted into 8-bit in order to set duty cycle of the PWM signal, this
Stepper motor (7)
conversion achieved by shifting right two times this 10-bit number.
UART (3)

MikroC Code:

unsigned int adc_value;


void main() {
ANSEL = 1; // Pin AN0 is configured as analog
GPIO = 0; // Initial state of GPIO port
TRISIO = 1; // Configure GP0 as input
PWM1_Init(5000); // PWM module initialization (5KHz)

while(1){
adc_value = ADC_Read(0); // Read analog value on AN0
PWM1_Set_Duty((adc_value >> 2));
PWM1_Start();
delay_ms(10);
}
}

at 11/17/2015 09:48:00 PM

Labels: LED, Microcontroller, PIC12F615

Newer Post Home Older Post

Temperature
measurement - Digital
temperature sensor
We provide Various
temperature sensors and
professional services.
gavincc.com

100 amp circuit A Boy watching As AC/DC DC/DC Shocking ! Pragathi


breaker - 0.02-100A, H0t Girl Bath In Fundamentals Aunty Hot Videos
Google+ Followers Up to... Hostel Leaked And...
Electron Note Ad carlingtech.com blogspot.in Ad micro.rohm.com blogspot.in

Add to circles

High Power Diode We wish Madhuri ek modran famely Jai Madaan: Profile,
Driver Dixit stayed away ki sex story kaisay Wiki, Boyfriend,
from these 7... sasur nay apni... Age and Contact...
Ad www.analogmodules.com blogspot.in blogspot.in blogspot.in

361 have me in View


circles all
About Me

Electron Note
Follow 361

View my complete profile

Electronics Note By O.B. All Rights Reserved. Simple theme. Theme images by billnoll. Powered by Blogger.

Вам также может понравиться