Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 211 → Rev 212

/PIC Stuff/Cerebot_32MX7_LED_Cube/main.c
39,6 → 39,7
#include <plib.h>
#include <stdlib.h>
#include "defines.h"
#include "UART1.h"
#include "SPI1.h"
#include "TIMER4.h"
#include "TIMER5.h"
86,15 → 87,19
// Set all analog I/O pins to digital
AD1PCFGSET = 0xFFFF;
 
// Initialize peripherals
// Initialize the SPI1 module
SPI1_DATA spi_data;
SPI1_Init(&spi_data);
SPI1_Init(&spi_data, NULL);
 
// Initializs the PWM output to 20MHz
// Initialize the UART1 module
UART1_DATA uart_data;
UART1_Init(&uart_data, &Cube_Data_In);
 
// Initializs the PWM2 output to 20MHz
PWM2_Init();
PWM2_Start();
 
// Initialize the cube
// Initialize the cube variables
CUBE_DATA cube_data;
Cube_Init(&cube_data, 0x40);
 
121,6 → 126,9
// Cube_Set_All(BLUE);
// Delay_MS(6000);
 
char start_text[] = "uC Started";
UART1_Write(start_text, 10);
 
// Set the overlay text
char text_string[] = "Welcome to the CCM Lab ";
Cube_Text_Init(text_string, 26, 0xFF, 0xFF, 0xFF);