CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

how to run #int_ext with tiny bootloader

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tapasdas000



Joined: 02 Apr 2009
Posts: 5

View user's profile Send private message

how to run #int_ext with tiny bootloader
PostPosted: Thu Apr 02, 2009 7:32 am     Reply with quote

Hi I am using tinyPIC bootloader 16f877a 20 mhz but I am unable use int_ext.
Can anybody help ?

I have already tried this code:
Code:
#build(reset=0x1, interrupt=0x8)
#ORG 0x0F00,0x0FFF {}

But no use.
With hardware it's not working. Embarassed
Heath



Joined: 21 Dec 2007
Posts: 41

View user's profile Send private message

PostPosted: Thu Apr 02, 2009 8:34 am     Reply with quote

Post a simple program that illustrates your problem please.
tapasdas000



Joined: 02 Apr 2009
Posts: 5

View user's profile Send private message

THANKS FOR RESPOND
PostPosted: Thu Apr 02, 2009 1:03 pm     Reply with quote

My code is simple test code.
Actually I am interfacing PIC16f877a with cc1100 Texas IC which is a 1 ghz transceiver

Initially I am checking external interrupt with simple test code. I am a new user to this Tiny bootloader. I am using it because my laptop doesn't support serial port so I am using usb to serial converter. But winpic programmer doesn't support this usb to serial converter so I my only option is this Tiny bootloader.

So I have to test if the external interrupt is working so that I can use it for my above application later.

So here is my test code:
Code:
#include<16f877a.h>

#build(reset=0x1, interrupt=0x8)
#ORG 0x0F00,0x0FFF {}
#use delay(clock=20000000)
int x;  //global variable

//Here is the ISR
# INT_EXT
 PortB_Interrupt()
{
 x=x+1;
}
void main(void)
{
  x = 1; //Initialize x
   OPTION_REG=0x07;   //portb pull up

     enable_interrupts(GLOBAL);  //Turn on interrupts
     enable_interrupts(INT_EXT); //Enable INT_EXT
   ext_int_edge( H_TO_L  );   
 
  while(1) {
   output_c(x);

  }
}


and my tyni bootloader version is 1.9.8

with the mplab simulator its works fine but with hardware it is not working
i think some probelem with interrupt vector 0x0004
Guest








PostPosted: Thu Apr 02, 2009 3:12 pm     Reply with quote

Hi

Maybe first try your code without the boot loader, if working try it with the loader.

You miss all the
Code:
#FUSES
!!!

And when I use the boot loader I don't use any of:
Code:
#build(reset=0x1, interrupt=0x8)
#ORG 0x0F00,0x0FFF {}


And try to use CCS way to make init of the PIC:-)
tapasdas000



Joined: 02 Apr 2009
Posts: 5

View user's profile Send private message

PostPosted: Thu Apr 02, 2009 7:00 pm     Reply with quote

hi thanks but I did not miss
Code:
#FUSE
but I am using my own header file and in that I have made #FUSE and my #FUSE is
Code:
 #FUSES XT, BROWNOUT, NOWDT,NOLVP

I want to tell that my code is working fine except the interrupt part.
You maybe ignored it but I have initialized
Code:
x=1;

and am outputting it on portc by
Code:
output_c(x);

and I am getting Port C as 1 on my hardware using the Tiny bootloader. The rest of the code is working fine except the isr part.

So is there any solution to it?

Question Question Question Sad
tapasdas000



Joined: 02 Apr 2009
Posts: 5

View user's profile Send private message

PostPosted: Fri Apr 03, 2009 2:52 am     Reply with quote

please is there any export out there who can help me with the above problem Rolling Eyes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group