Editing A Really Basic Guide to the PIC Microprocessor and BoostC

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 415: Line 415:
  
 
If you do get an error you do not understand, get the exact wording and use Google advanced search to search the SourceBoost forum website at: [http://forum.sourceboost.com/ | Source Boost Forum ]
 
If you do get an error you do not understand, get the exact wording and use Google advanced search to search the SourceBoost forum website at: [http://forum.sourceboost.com/ | Source Boost Forum ]
 +
  
 
Some errors that have cost me a good bit of time
 
Some errors that have cost me a good bit of time
Line 436: Line 437:
 
|Normally it is just missing at the end of the line listed by the error message, but not always.  Sometimes you get this message when a missing semicolon is not the problem.  Just to fake you out.
 
|Normally it is just missing at the end of the line listed by the error message, but not always.  Sometimes you get this message when a missing semicolon is not the problem.  Just to fake you out.
 
<!-------------------------------->
 
<!-------------------------------->
|-valign="top"
 
|set-bit instead of set_bit
 
|failure
 
HelloWorld.c(100): error: missing semicolon
 
HelloWorld.c(100): error: missing right paren
 
HelloWorld.c(37): error: failure
 
|Set-bit is subtraction not the name of a subroutine or function. Note that the error message is “wrong”. I think I have gotten other error messages for the same error. You might want to do a search on set-bit and clear-bit to make sure you have not used them.
 
<!-------------------------------->
 
|-valign="top"
 
|“Equal sign” instead of “is equal sign”:  = instead of ==
 
|Normally none! no error message.
 
|Inside an if statement as in if( a = b ) then equal sign is almost always wrong, if you are testing for equality you want if ( a == b ).
 
<!-------------------------------->
 
|-valign="top"
 
|Low voltage programming on
 
|None, but port b 3 does not work.
 
|Turn off LVP ( low voltage programming ) to use this port.
 
<!-------------------------------->
 
|-valign="top"
 
|Analog input enabled
 
|None but porta I/O will not work.
 
|Simulator may catch this error.
 
<!--------------------------------
 
 
|-valign="top"
 
|-valign="top"
 
|
 
|
 
|
 
|
 
|
 
|
<!--------------------------------
+
<!-------------------------------->
|-valign="top"
 
|
 
|
 
|
 
<!--------------------------------
 
|-valign="top"
 
|
 
|
 
|
 
<!--------------------------------
 
|-valign="top"
 
|
 
|
 
|
 
<!--------------------------------
 
 
|-valign="top"
 
|-valign="top"
 
|
 
|
Line 486: Line 449:
  
 
|}
 
|}
 +
 +
If ( ... ) instead of if( ... )
 +
 +
 +
 +
 +
Normally it is just missing at the end of the line listed by the error message, but not always.
 +
 +
 +
 +
set-bit instead of set_bit
 +
failure
 +
C:\Russ\PER\_XX\PIC\BoostC\MyTutorial\HelloWorld.c(100): error: missing semicolon
 +
C:\Russ\PER\_XX\PIC\BoostC\MyTutorial\HelloWorld.c(100): error: missing right paren
 +
C:\Russ\PER\_XX\PIC\BoostC\MyTutorial\HelloWorld.c(37): error: failure
 +
 +
 +
Set-bit is subtraction not the name of a subroutine or function. Note that the error message is “wrong”. I think I have gotten other error messages for the same error. You might want to do a search on set-bit and clear-bit to make sure you have not used them.
 +
 +
 +
 +
“Equal sign” instead of “is equal sign”:  = instead of ==
 +
 +
Normally none!
 +
Inside an if statement as in if( a = b ) then equal sign is almost always wrong, if you are testing for equality you want if ( a == b ).
 +
 +
 +
 +
Low voltage programming on
 +
None, but port b 3 does not work.
 +
Turn off LVP ( low voltage programming ) to use this port.
 +
 +
 +
 +
Analog input enabled
 +
None but port a I/O will not work.
 +
Simulator may catch this error.
  
 
== Appendix: Other Documents You Should Reference ==
 
== Appendix: Other Documents You Should Reference ==

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)