Вс фев 10, 2019 21:19:27
#pragma config POSCMOD = NONE // Primary Oscillator Select->Primary oscillator disabled
#pragma config I2C1SEL = PRI // I2C1 Pin Location Select->Use default SCL1/SDA1 pins
#pragma config IOL1WAY = ON // IOLOCK Protection->Once IOLOCK is set, cannot be changed
#pragma config OSCIOFNC = ON // Primary Oscillator Output Function->OSC2/CLKO/RC15 functions as port I/O (RC15)
#pragma config FCKSM = CSECMD // Clock Switching and Monitor->Clock switching is enabled, Fail-Safe Clock Monitor is disabled
#pragma config FNOSC = FRC // Oscillator Select->FRC
#pragma config SOSCSEL = SOSC // Sec Oscillator Select->Default Secondary Oscillator (SOSC)
#pragma config WUTSEL = LEG // Wake-up timer Select->Legacy Wake-up Timer
#pragma config IESO = ON // Internal External Switch Over Mode->IESO mode (Two-Speed Start-up) enabled
// CONFIG1
#pragma config WDTPS = PS32768 // Watchdog Timer Postscaler->1:32768
#pragma config FWPSA = PR128 // WDT Prescaler->Prescaler ratio of 1:128
#pragma config WINDIS = ON // Watchdog Timer Window->Standard Watchdog Timer enabled,(Windowed-mode is disabled)
#pragma config FWDTEN = OFF // Watchdog Timer Enable->Watchdog Timer is disabled
#pragma config ICS = PGx1 // Comm Channel Select->Emulator EMUC1/EMUD1 pins are shared with PGC1/PGD1
#pragma config BKBUG = OFF // Background Debug->Device resets into Operational mode
#pragma config GWRP = OFF // General Code Segment Write Protect->Writes to program memory are allowed
#pragma config GCP = OFF // General Code Segment Code Protect->Code protection is disabled
#pragma config JTAGEN = OFF // JTAG Port Enable->JTAG port is disabled
#include <xc.h>
#define FCY 32000000UL
#include <libpic30.h>
int main()
{
OSCCON=0b0001000100000000;
CLKDIV=0b0000000000000000;
OSCTUN=0;
AD1PCFG = 0xffff;
TRISA = 0;
TRISB = 0;
while(1)
{
_LATA0 = !_LATA0;
__delay_ms(1000);
}
}
Вс фев 10, 2019 21:43:14
Вс фев 10, 2019 21:49:03
Вс фев 10, 2019 21:55:10
Пн фев 11, 2019 14:54:37
Сб мар 02, 2019 13:26:35
while(1)
{
_LATA0 = !_LATA0;
__delay_ms(1000);
}
}
Пн мар 04, 2019 14:14:04
Вс мар 03, 2024 16:57:06