#define MX_PIC
//Defines for microcontroller
#define P18F4520
#define MX_EE
#define MX_EE_TYPE3
#define MX_EE_SIZE 256
#define MX_SPI
#define MX_SPI_C
#define MX_SPI_SDI 4
#define MX_SPI_SDO 5
#define MX_SPI_SCK 3
#define MX_UART
#define MX_UART_C
#define MX_UART_TX 6
#define MX_UART_RX 7
#define MX_I2C
#define MX_MI2C
#define MX_I2C_C
#define MX_I2C_SDA 4
#define MX_I2C_SCL 3
#define MX_PWM
#define MX_PWM_CNT 2
#define MX_PWM_TRIS1 trisc
#define MX_PWM_1 2
#define MX_PWM_TRIS2 trisc
#define MX_PWM_2 1
#define MX_PWM_TRIS2a trisb
#define MX_PWM_2a 3
//Functions
#define MX_CLK_SPEED 19660800
#ifdef _BOOSTC
#include <system.h>
#endif
#ifdef HI_TECH_C
#include <pic18.h>
#endif
//Configuration data
//Internal functions
#include "C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h"
//Macro function declarations
//Variable declarations
//Macro implementations
void main()
{
//Initialisation
adcon1 = 0x0F;
//Interrupt initialisation code
//Loop
//Loop: While 1
while (1)
{
//Output
//Output: 1 -> PORT A
trisa = 0x00;
porta = 1;
//Delay
//Delay: 1 s
delay_s(1);
//Output
//Output: 0 -> PORT A
trisa = 0x00;
porta = 0;
//Delay
//Delay: 1 s
delay_s(1);
}
mainendloop: goto mainendloop;
}
void MX_INTERRUPT_MACRO(void)
{
}