From: SourceForge.net <no...@so...> - 2006-11-23 14:28:07
|
Support Requests item #1601733, was opened at 2006-11-23 12:53 Message generated for change (Settings changed) made by tecodev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=200599&aid=1601733&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Priority: 5 Private: No Submitted By: marco_gaio (marco_gaio) Assigned to: Nobody/Anonymous (nobody) Summary: PORTAbits type definition only works with PIC16 port? Initial Comment: I tried SDCC version 6.0 both with the pic14 and the pic16 port. However with the pic16 port(i.e. for a 18f452, including pic18fregs.h) I can use e.g. PORTAbits.RA0 to set/read that . Instead, with pic14 the port(e.g. 16f84a including pic16regs.h) I cannot use such definition of PORTAbits, since the compiler couln't recognize the structure PORTAbits and I can't neither declare it by using the _at keyword to locate such structure at address 5. Does somebody can help me? Thanks, Regards ---------------------------------------------------------------------- Comment By: marco_gaio (marco_gaio) Date: 2006-11-23 14:26 Message: Logged In: YES user_id=1652313 Originator: YES Thanks Raphael for yor advice, I'm sure I haven't got the right header for the 16f84a, since it lacks the PORTA_bits and RA0 definitions. Please consider this request as close, I will look for the updated version. Thanks again and Regards Marco ---------------------------------------------------------------------- Comment By: Raphael Neider (tecodev) Date: 2006-11-23 13:37 Message: Logged In: YES user_id=1115835 Originator: NO Not sure where your problem is: The header file for the pic16f84a.h tells you there is a struct PORTA_bits defined (beware the underscore, though); and there are aliases (macros, defines) set up for you to use RA0 instead of PORTA_bits.RA0 (in fact, the latter will yield syntax errors unless you #undef RA0 beforehand). If your pic16f84a.h differs in that these are not defined, just grab a more recent version (nightly build, strongly recommended) and try again. Or download just the required header file and library source (device/lib/pic/libdev/pic16f84a.c) and link them into your project. Please close this request if your problem is solved. HTH, Raphael BTW: You cannot define objects at locations already used in other modules; so all SFR related declarations should go into the pic16fXXX.[ch] files; you may want to override the library versions with modified ones in your project tree. In this case, just make sure to have -I. before the true library path in your sdcc command line. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=200599&aid=1601733&group_id=599 |