void pwm_init(void){
// Setting PWM frequency = 4.90KHz at 8MHz OSC Freq
PR2 = 0x65;
T2CKPS1 = 0;
T2CKPS0 = 1; // Timer 2 prescale = 4.
CCPR1L = 0; // Duty...
Type: Posts; User: Nurin Kyoto
void pwm_init(void){
// Setting PWM frequency = 4.90KHz at 8MHz OSC Freq
PR2 = 0x65;
T2CKPS1 = 0;
T2CKPS0 = 1; // Timer 2 prescale = 4.
CCPR1L = 0; // Duty...
#include <htc.h>
__CONFIG(1,0x0F24);
__CONFIG(2,0X0000);
#define _XTAL_FREQ 8000000 //using internal osc
#define UART_BAUD 9600
Start(){
char exit,key;
exit =1;
while(exit)
ooo.. so it is just a system file? tq... when the coding being written like that it look complicated.... thx again...
can i ask one more thing, why there are some coding use '!= ' what does it do?
#include d:\mc51\8051io.
h
#include d:\mc51\8051reg.
tq...