Simulación de codigo en MPLAB

Buenas noches, estoy con el tema de crear el *.hex en mplab, pero no hay manera, he probado 200 codigos de 200 maneras diferentes, pero no hay manera, siempre error, ahora he hecho este:

#include<16f628a.h>
#fuses INTRC_IO,NOWDT,NOLVP,MCLR,NOPROTECT
#use delay(clock=4000000)
#byte TRISB=0x86
#byte PORTB=0x06


void main(void){
TRISB=0x00;
PORTB=0x00;
do{
output_high(PIN_B0);
delay_ms(1000);
output_low(PIN_B0);
delay_ms(1000);
}while(TRUE);

}

un simple codigo copiado de este foro, he hecho file/new guardado en asm, pasado a source files, sale allí como asm, pego el codigo, pero a la hora de guardar sale siempre error, también lo he probado con el C18 y lo mismo (no se muy bien que es pero tampoco me va)

bueno el tema es que al pasar el codigo anterior y darle a project/built all, me sale error:

----------------------------------------------------------------------
Debug build of project `C:\projectes PICS\002\002_en_mcp.mcp' started.
Language tool versions: MPASMWIN.exe v5.44, mplink.exe v4.42, mplib.exe v4.42
Preprocessor symbol `__DEBUG' is defined.
Sat Mar 31 22:29:28 2012
----------------------------------------------------------------------
Make: The target "C:\projectes PICS\002\002_ams.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F628A "002_ams.asm" /l"002_ams.lst" /e"002_ams.err" /o"002_ams.o" /d__DEBUG=1
Error[105] C:\PROJECTES PICS\002\002_AMS.ASM 1 : Cannot open file (Include File "16f628a.h" not found)
Error[122] C:\PROJECTES PICS\002\002_AMS.ASM 2 : Illegal opcode (INTRC_IO)
Error[122] C:\PROJECTES PICS\002\002_AMS.ASM 3 : Illegal opcode (delay)
Error[122] C:\PROJECTES PICS\002\002_AMS.ASM 4 : Illegal opcode (TRISB)
Error[122] C:\PROJECTES PICS\002\002_AMS.ASM 5 : Illegal opcode (PORTB)
Error[122] C:\PROJECTES PICS\002\002_AMS.ASM 8 : Illegal opcode (main)
Warning[207] C:\PROJECTES PICS\002\002_AMS.ASM 9 : Found label after column 1. (TRISB)
Warning[207] C:\PROJECTES PICS\002\002_AMS.ASM 10 : Found label after column 1. (PORTB)
Warning[207] C:\PROJECTES PICS\002\002_AMS.ASM 11 : Found label after column 1. (do)
Error[108] C:\PROJECTES PICS\002\002_AMS.ASM 11 : Illegal character ({)
Warning[207] C:\PROJECTES PICS\002\002_AMS.ASM 12 : Found label after column 1. (output_high)
Error[108] C:\PROJECTES PICS\002\002_AMS.ASM 12 : Illegal character (()
Warning[207] C:\PROJECTES PICS\002\002_AMS.ASM 13 : Found label after column 1. (delay_ms)
Error[108] C:\PROJECTES PICS\002\002_AMS.ASM 13 : Illegal character (()
Warning[207] C:\PROJECTES PICS\002\002_AMS.ASM 14 : Found label after column 1. (output_low)
Error[108] C:\PROJECTES PICS\002\002_AMS.ASM 14 : Illegal character (()
Warning[207] C:\PROJECTES PICS\002\002_AMS.ASM 15 : Found label after column 1. (delay_ms)
Error[108] C:\PROJECTES PICS\002\002_AMS.ASM 15 : Illegal character (()
Error[108] C:\PROJECTES PICS\002\002_AMS.ASM 16 : Illegal character (})
Error[108] C:\PROJECTES PICS\002\002_AMS.ASM 18 : Illegal character (})
Error[129] C:\PROJECTES PICS\002\002_AMS.ASM 19 : Expected (END)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\projectes PICS\002\002_en_mcp.mcp' failed.
Language tool versions: MPASMWIN.exe v5.44, mplink.exe v4.42, mplib.exe v4.42
Preprocessor symbol `__DEBUG' is defined.
Sat Mar 31 22:29:30 2012
----------------------------------------------------------------------
BUILD FAILED


muchos error, para algo que creia que era muy sencillo, copiar pegar, simular.... osea me refiero que me esta dando muchos doleres de cabeza ya antes de empezar el mplab.

alguna ayuda de algun samaritano ?

abro este nuevo post pq ya he probado muchas cosas y no hay manera, nose quizas esta mal el software ? es que nose que puede ser... lo hago todo tal como marcan los tutoriales pero no hay manera, seguro que algo me dejaré pero nose que puede ser.

Muchas gracias de antemano.
 
Atrás
Arriba