I use 12F683.
BEGIN
SET 1 ON PORTA BIT 0
END
when i try to compile to cip or hex ... next error mesage apears:
"C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic16.flowcode.exe -v -t PIC12F683 "test2_12F683.c"
BoostC Optimizing C Compiler Version 6.70 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited
test2_12F683.c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" D:\Flowcode\test2_12F683.c -i "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC12F683 -la -c2 -o test2_12F683.pp -v -d _BOOSTC -d _PIC16
D:\Flowcode\test2_12F683.c(57:1): error: unknown identifier 'cmcon'
D:\Flowcode\test2_12F683.c(57:1): error: invalid operand 'cmcon'
D:\Flowcode\test2_12F683.c(57:7): error: failed to generate expression
test2_12F683.c success
failure
........
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.
FINISHED "
C code looks like that:
#define MX_PIC
//Defines for microcontroller
#define P12F683
#define MX_EE
#define MX_EE_TYPE1
#define MX_EE_SIZE 256
#define MX_PWM
#define MX_PWM_CNT 1
#define MX_PWM_TRIS1 trisio
#define MX_PWM_1 2
//Functions
#include <system.h>
#pragma CLOCK_FREQ 19660800
//Configuration data
#pragma DATA 0x2007, 0x3cf4
//Internal functions
#include "C:\Program Files\Matrix Multimedia\Flowcode V3\FCD\internals.h"
//Macro function declarations
//Variable declarations
//Supplementary defines
//Macro implementations
//Supplementary implementations
void main()
{
//Initialisation
ansel = 0x20;
cmcon = 0x07;
//Interrupt initialisation code
option_reg = 0xC0;
//Output
//Output: 1 -> A0
trisio = trisio & 0xfe;
if (1)
gpio = (gpio & 0xfe) | 0x01;
else
gpio = gpio & 0xfe;
mainendloop: goto mainendloop;
}
void interrupt(void)
{
}
I think that CMCON register should be "CMCON0" ...
What is the solution on this?
12F683 - problems on compiling
Re: 12F683 - problems on compiling
I solve the problem. U have a little bug.
In "FCD" director C:\Program Files\Matrix Multimedia\Flowcode V3\fcd there is 12F683.FCD file. i open it with notepad and found this line:
Initialise="ansel = 0x20;\ncmcon = 0x07;\n" and modify with
Initialise="ansel = 0x20;\ncmcon0 = 0x07;\n" and IT'S WORKING.
There is no CMCON register for 12F683 only CMCON0 and CMCON1
In "FCD" director C:\Program Files\Matrix Multimedia\Flowcode V3\fcd there is 12F683.FCD file. i open it with notepad and found this line:
Initialise="ansel = 0x20;\ncmcon = 0x07;\n" and modify with
Initialise="ansel = 0x20;\ncmcon0 = 0x07;\n" and IT'S WORKING.
There is no CMCON register for 12F683 only CMCON0 and CMCON1
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: 12F683 - problems on compiling
Hello Raptoru
Which version of Flowcode are you using.
To anyone else with the same problem I have attached the current 12F683 FCD file.
Which version of Flowcode are you using.
To anyone else with the same problem I have attached the current 12F683 FCD file.
- Attachments
-
- 12F683.fcd
- (5 KiB) Downloaded 522 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel