its seems interrupt is not working ... plz find ,where i gone wrong ...
OUTPUT : I NEED TO DISPLAY 1 , WHEN EXTERNAL INTERRUPT OCCURS ... EXTERNAL INTERRUPT IS THE JOYSTICK (UP DIRECTION)...
/************************* (C) COPYRIGHT 2007 RAISONANCE **********************
* File Name : Application.c
* Author :
* Date First Issued :
* Description : Circle_App CircleOS application template.
* Revision :
*******************************************************************************/
/* Includes ------------------------------------------------------------------*/
#include "circle_api.h"
/* Private defines -----------------------------------------------------------*/
#define NEEDEDVERSION "V 1.5" // Put here the minimal CircleOS version needed by your application
/* Private variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
enum MENU_code MsgVersion(void);
void init(void);
void change (void);
/* Public variables ----------------------------------------------------------*/
const char Application_Name[8+1] = {"My App"}; // max 8 characters for application name
/*******************************************************************************
* Function Name : Application_Ini
* Description : Initialization function of Circle_App. This function will
* be called only once by CircleOS.
* Input : None
* Return : MENU_CONTINUE_COMMAND
*******************************************************************************/
enum MENU_code Application_Ini ( void )
{
if(strcmp(UTIL_GetVersion(), NEEDEDVERSION) < 0)
{
return MsgVersion();
}
void init(void)
{
RB0:1;
INT0:1;
GIEH:1 ;
PEIE:1;
RBIP:1;
INTEDG1:1;
}
// TODO: Write your application initialization function here.
return MENU_CONTINUE_COMMAND;
}
/*******************************************************************************
* Function Name : Application_Handler
* Description : Management of the Circle_App.
*
* Input : None
* Return : MENU_CONTINUE
*******************************************************************************/
enum MENU_code Application_Handler ( void )
{
// TODO: Write your application handling here.
// This routine will get called repeatedly by CircleOS, until we
// return MENU_LEAVE
DRAW_DisplayString(5,60,"1",17);
#pragma code HIGH_INTERRUPT_VECTOR=0X8
/*void high_ISR (void)
{
goto change
}
#pragma code*/
IDLEN:1;
return MENU_CONTINUE; // Returning MENU_LEAVE will quit to CircleOS
}
/*******************************************************************************
* Function Name : MsgVersion
* Description : Display the current CircleOS version and the version needed
* exit to main menu after 4 secondes
*
* Input : None
* Return : MENU_CONTINUE
*******************************************************************************/
enum MENU_code MsgVersion(void)
{
int hh,mm,ss,ss2;
DRAW_DisplayString(5,60,"CircleOS",17);
DRAW_DisplayString(80,60,UTIL_GetVersion(),3);
DRAW_DisplayString(5,34,NEEDEDVERSION,3);
DRAW_DisplayString(40,34," required",12);
RTC_GetTime(&hh,&mm,&ss);
ss = ss + 4; // 4 secondes
ss = ss%60;
do
{
RTC_GetTime(&hh,&mm,&ss2);
}while (ss2 != ss); // do while < 4 secondes
return MENU_REFRESH;
}
#pragma interrupt change
void change(void)
{
DRAW_DisplayString(5,60,"2",17);
INT0IF:0;
}
THANKS FOR YOUR HELP