You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
368 B

/*
* File: newmain.c
* Author: dev
*
* Created on March 23, 2020, 11:48 PM
*/
#include <xc.h>
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
//Write CCP
CCP = 0xD8;
//change CLK to 128KHz
CLKMSR = 0b01;
// PB2 output
DDRB = 1<<2;
while(1)
{
// Toggle PB2
PINB = 1<<2;
//_delay_ms(500);
}
}