Editing BoostC tiny Wiki

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 73: Line 73:
  
 
Normally the compiler will find the library file needed, but if you get messages that functions are not found include the library that contains them, see the .h file with the same name for the library function.  This has been know to work with the EEProm Library.  Choose the right one, for the 18F or 16F if there is a choice.
 
Normally the compiler will find the library file needed, but if you get messages that functions are not found include the library that contains them, see the .h file with the same name for the library function.  This has been know to work with the EEProm Library.  Choose the right one, for the 18F or 16F if there is a choice.
 
=== How to use PIC registers as C variables ===
 
 
BoostC compiler can map C variables on specific addresses. This becomes handly when one wants to use PIC registers as C variables. For example PIC CCPR1L and CCPR1H are a consecutively addressed register pair.
 
 
  volatile unsigned short ccpr1 @ 0xFBE; //declare a 16 bit variable that is located at address 0xFBE, just where CCPR1 registers start
 
  //Now this variable can be used in C cone
 
  ccpr1 = 0x2400; //for example assign 0x2400 to it what writes 0x00 into CCPR1L and 0x24 into CCPR1H
 
  
 
== Standard C Issues ==
 
== Standard C Issues ==

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)