problem atm88

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
ikke
Posts: 13
Joined: Sat Dec 12, 2009 6:08 pm
Contact:

problem atm88

Post by ikke »

Hello,,
I have trouble compiling a atm88, I get the message:
D:\PAPA\flowcode\voorbeelden\test1>"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\bin\avr-gcc.exe" -mmcu=atmega88 -Os -funsigned-char -o "D:\PAPA\flowcode\VOORBE~1\test1\druk188.elf" "D:\PAPA\flowcode\VOORBE~1\test1\druk188.c"
In file included from D:\PAPA\flowcode\VOORBE~1\test1\druk188.c:57:
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'FC_MARKER':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:110: error: 'DDRA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:110: error: (Each undeclared identifier is reported only once
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:110: error: for each function it appears in.)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:112: error: 'PORTA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:114: error: 'PINA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'icd_byte_tx':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:329: error: 'DDRA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:331: error: 'PORTA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'icd_byte_rx':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:366: error: 'DDRA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:374: error: 'PINA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:385: error: 'PORTA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'wait_clock':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:401: error: 'PINA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'wait_data':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:413: error: 'PINA' undeclared (first use in this function)

Error returned from [avr-gcc.exe]

....................
Return code = 1
Please help

User avatar
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: problem atm88

Post by Benj »

Hello

If you look at the chip window for the ATMEGA88 then you will see that the device does not have a port A. This is why the various references to Port A are failing. Check your program and your component connections to make sure you are not using port A in your program and the code should then compile correctly.

ikke
Posts: 13
Joined: Sat Dec 12, 2009 6:08 pm
Contact:

Re: problem atm88

Post by ikke »

I don't have anything connected on porta see c-file
//************************************************************************************
//**
//** File name: D:\PAPA\flowcode\voorbeelden\test1\druk188bis.c
//** Generated by: Flowcode v3.3.5.45
//** Date: Monday, December 21, 2009 17:41:18
//** Licence: Professional
//** Registered to: Vandecruys Johan
//**
//**
//** http://www.matrixmultimedia.com
//************************************************************************************


#define MX_AVR

//Defines voor de microcontroller
#define MX_AVR
#define MX_EE
#define MX_EE_SIZE 512
#define MX_SPI
#define MX_SPI_B
#define MX_SPI_SDI 4
#define MX_SPI_SDO 3
#define MX_SPI_SCK 5
#define MX_UART
#define MX_UART_ID
#define MX_UART_UCSRC
#define MX_UART_C
#define MX_UART_TX 1
#define MX_UART_RX 0
#define MX_MI2C
#define MX_I2C_C
#define MX_I2C_SDA 4
#define MX_I2C_SCL 5
#define MX_PWM
#define MX_PWM_PORT PORTB
#define MX_PWM_CNT 2
#define MX_PWM_TRIS1 DDRB
#define MX_PWM_1 1
#define MX_PWM_TRIS2 DDRB
#define MX_PWM_2 2

//Functies
#define F_CPU 20000000UL
#include <avr\io.h>
#include <avr\interrupt.h>
#include <avr\eeprom.h>
#include <MX_util\delay.h>
#include <MX_util\bit_cmds.h>

//Configuratiegegevens
#pragma DATA 0x0, 0xdf
#pragma DATA 0x1, 0xff
#pragma DATA 0x2, 0xff

//Interne functies
#include "C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h"

//Macro functie declaraties


//Variable declaraties
volatile char FCV_OUTPUT;
volatile char FCV_DRUKC1;
volatile char FCV_DRUKCO;



//Toegevoegde definities


//Macro implementaties

//Toegevoegde implementaties


int main()
{

//Initialisatie
MCUSR=0x00;
WDTCSR=0x10;


//Interrupt initialisatie code

//Loop
//Loop: While 1
while( 1 )
{
//Input
//Input: C0 -> drukco
DDRC = DDRC & 0xfe;
FCV_DRUKCO = ((PINC & 0x01) == 0x01);


//Input
//Input: C1 -> drukc1
DDRC = DDRC & 0xfd;
FCV_DRUKC1 = ((PINC & 0x02) == 0x02);


//Decision
//Decision: drukco?
if( FCV_DRUKCO )
{
//Calculation
//Calculation:
// output = output + 1
FCV_OUTPUT = FCV_OUTPUT + 1 ;


}


//Output
//Output: output -> PORT B
DDRB = 0xFF;
PORTB = FCV_OUTPUT;


}


mainendloop: goto mainendloop;
}

User avatar
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: problem atm88

Post by Benj »

Hello

Where did you get your installation for Flowcode AVR from?

Your compiled C code states v3.3 but your error messages are showing an error relating to a function that is only included in version 4.
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'icd_byte_tx':
Have you installed version 4? Have you mixed up the files at all.

Can you uninstall your version 3 and re-install to see if that fixes the problem.

ikke
Posts: 13
Joined: Sat Dec 12, 2009 6:08 pm
Contact:

Re: problem atm88

Post by ikke »

First: THANK YOU!!!
Yes it worked.
I got my copy from Elektor.
I first installed the free copy from the website and than simply put in the licensekey from the DVD.
Greetings.

User avatar
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: problem atm88

Post by Benj »

Hello Ikke

Great glad your all up and running now. Thanks for letting us know.

ikke
Posts: 13
Joined: Sat Dec 12, 2009 6:08 pm
Contact:

Re: problem atm88

Post by ikke »

Hello, I am still can't put my program into the atm88 directly from flowcode. When using avr studio it goes.? I keep receiving:
Launching the programmer...

C:\Program Files\Matrix Multimedia\Flowcode_AVR\Tools\MX_bats\avrc.bat m88 avrispmkii usb "druk188bis.hex" 0 3 223 -1 -1


D:\PAPA\flowcode\voorbeelden\test1>"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\AVRDUDEusb\avrdude.exe" -p m88 -P usb -c avrispmkii -U flash:w:"druk188bis.hex"

Error returned from [avrdude]

Return code = 1

Verzenden van de flowchart naar de microcontroller is mislukt. Controleer de opties voor de programmeersoftware en de verbinding tussen PC en processor.

FINISHED
I allready looked at the posts on the forum but could not solve the problem on my one.
If anyone can help me?
Allready THANKS

ikke
Posts: 13
Joined: Sat Dec 12, 2009 6:08 pm
Contact:

Re: problem atm88

Post by ikke »

Sorry for the last reply. I now use the stk500 and everything is working.
Sorry

Post Reply