Coding and general discussion relating to the compiler
Moderators: David Barker, Jerry Messina
-
Jerry Messina
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Post
by Jerry Messina » Thu Mar 22, 2012 9:21 am
If I include CONVERT.BAS (even if I don't reference any of the routines in my code) I get a compiler error on line 455 CMCON = $07.
The compiler says:
[Error] utils.bas(455): Left side cannot be assigned to
[Error] utils.bas(455): Identifier not declared: CMCON
Convert.bas includes the file Utils.bas, and at the bottom of Utils.bas is a subroutine SetAllDigital() which has some very device-specific register usage. It's used to change the IO pin operation from analog (the default) to digital mode.
You can find a more up to date replacement for SetAllDigital() on the wiki page
http://www.sfcompiler.co.uk/wiki/pmwiki ... tDigitalIO
For the SE compiler, be sure to set
#option SWORDFISH_SE = true
Your Pickit2/Amicus board issue looks a little suspicious, but I've never used the board, just the compiler. It looks like there's some sort of int vs external supply issue going on.
-
Aresby
- Posts: 64
- Joined: Fri Mar 16, 2012 8:35 am
- Location: Milton Keynes, UK
-
Contact:
Post
by Aresby » Thu Mar 22, 2012 10:59 am
Fixed.
Thanks Jerry, how would I have got this far without you?
Swordfish is talking happily to the PICKit2 programmer again (see my previous post(s) and everything compiles now without errors.
And my PICAXE LCD screen is displaying exactly what it is supposed to.
Finally I can concentrate on my PIC project using a development environment that is second to none.
All I can say is that programming in ASP.NET and SQL server is far less strenuous! (Admitedly I have had only a few weeks' experience in programming PICs and about 31 years programming 'real' computers so maybe my judgement is somewhat biased!).
Onward and upward... And it's a nice sunny day here in the UK with temperatures reaching 19 C (66.2F) later, they say.
Aresby
Swordfish & PIC Newbie