Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Flowcode Problem

Status
Not open for further replies.

1230

Member level 3
Joined
Jun 18, 2002
Messages
62
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
355
I am beginner to microcontroller. I am unable to generate proper HEX file for PIC. I am using Flowcode to generate HEX file. When i draw any flowchart in flowcode, it simulates correctly(in flowcode), but when i am putting the HEX file in PIC chip for simulation using PROTEUS simulator, i am not getting any output.

Pls help me.
 

Thank you sir.



When i am simulating in FLOWCODE, i am getting O/P, but when i simulate in PROTEUS, i am not getting any O/P. Even i burned this code after compiling it into PIC18f4520,but got no result.


#define MX_PIC

//Defines for microcontroller
#define P18F4520
#define MX_EE
#define MX_EE_TYPE3
#define MX_EE_SIZE 256
#define MX_SPI
#define MX_SPI_C
#define MX_SPI_SDI 4
#define MX_SPI_SDO 5
#define MX_SPI_SCK 3
#define MX_UART
#define MX_UART_C
#define MX_UART_TX 6
#define MX_UART_RX 7
#define MX_I2C
#define MX_MI2C
#define MX_I2C_C
#define MX_I2C_SDA 4
#define MX_I2C_SCL 3
#define MX_PWM
#define MX_PWM_CNT 2
#define MX_PWM_TRIS1 trisc
#define MX_PWM_1 2
#define MX_PWM_TRIS2 trisc
#define MX_PWM_2 1
#define MX_PWM_TRIS2a trisb
#define MX_PWM_2a 3

//Functions
#define MX_CLK_SPEED 19660800
#ifdef _BOOSTC
#include <system.h>
#endif
#ifdef HI_TECH_C
#include <pic18.h>
#endif

//Configuration data

//Internal functions
#include "C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h"

//Macro function declarations


//Variable declarations



//Macro implementations

void main()
{

//Initialisation
adcon1 = 0x0F;


//Interrupt initialisation code



//Loop
//Loop: While 1
while (1)
{
//Output
//Output: 1 -> PORT A
trisa = 0x00;
porta = 1;


//Delay
//Delay: 1 s
delay_s(1);


//Output
//Output: 0 -> PORT A
trisa = 0x00;
porta = 0;


//Delay
//Delay: 1 s
delay_s(1);


}


mainendloop: goto mainendloop;
}

void MX_INTERRUPT_MACRO(void)
{
}
 

Pls help me...
 

Remove trisa code from while(1) loop and place it before while(1) loop. Use LATx instead of PORTx.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top