El presente sitio presenta diseños y proyectos realizados con Solidworks y otros programas 3d , además de laminas y modelos 3d para practicar en casa, con el único objetivo de poder aprender y explorar la capacidad de Solidworks, no existiendo en ningún caso fines de lucro.
Friday, March 1, 2013
#include
#include
#include
#include
#include
#pragma config FOSC = XT_XT,FCMEN = OFF,IESO = OFF, CPUDIV = OSC1_PLL2
#pragma config PWRT = ON,BOR = OFF,BORV = 0
#pragma config WDT = OFF,WDTPS = 32768
#pragma config MCLRE = ON,LPT1OSC = OFF,PBADEN = OFF,CCP2MX = OFF
#pragma config STVREN = OFF,LVP = OFF,XINST = OFF,DEBUG = OFF
#pragma config CP0 = ON,CP1 = ON,CP2 = ON
#pragma config CPB = ON,CPD = ON
#pragma config WRT0 = ON,WRT1 = ON,WRT2 = ON
#pragma config WRTB = ON,WRTC = ON,WRTD = ON
#pragma config EBTR0 = ON,EBTR1 = ON,EBTR2 = ON
#pragma config EBTRB = ON
void main(void){
char string[6];
unsigned int value;
TRISC=0x80;
OpenUSART( USART_TX_INT_OFF & //Disable Interrupts
USART_RX_INT_OFF & //----------------
USART_ASYNCH_MODE & //Modo asincronico
USART_EIGHT_BIT & //8 bit
USART_CONT_RX & //resepcion continua
USART_BRGH_HIGH,
25); //FOSC / (16 * (spbrg + 1))
//
OpenTimer2( TIMER_INT_OFF &
T2_PS_1_16 &
T2_POST_1_16);
OpenPWM1(255);
SetDCPWM1(100);
printf("HOLA MUNDO!!!\r\n");
getsUSART(string,5);
if(string[0]=='A') PORTC=0x01 & 0x0F;
printf("\r\n%s",string);
while(1);
}
Subscribe to:
Post Comments (Atom)
Currently have 0 comentarios: