Jump to content

Recommended Posts



I'm trying to begin using the C language for PIC's, having done my previous projects in assembly. (ra68gi's post for beginners makes it seem pretty straight-forward! Thanks!)


This is my first program, written simply to learn the compiler's ropes, before I start to flash a few lights.


I've read the BoostC compiler manual, done searches, and am still stumped as to why I get a "FATAL: Unexpected EOF" error from this:


#include <system.h>

#pragma CLOCK_FREQ 20000000 //20MHz


void main()
unsigned char test;
trisa = 0xFF;
trisb = 0xFF;
trisc = 0xFF;


clear_bit(option_reg,T0CS);	//internal clock
clear_bit(option_reg,PSA);	//prescaller assigned to T0
clear_bit(option_reg,PS2);	//prescaler 000 = 1:2 T0

while( 1 )
	test = 0x1;


The full error message:





FATAL: Unexpected EOF



Error: preprocessing error

"C:\Program Files\SourceBoost\boostc.pic16.exe" 876a_flash_led.c -t PIC16F876A

Exit code was 1.

Removing target: 876a_flash_led.obj

Failed to locate output file 'C:\Program Files\SourceBoost\Projects\876a flash\876a_flash_led.hex'





So what am I missing? Is it in the code, or some setup issue?



Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...