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

16F877A getting stack overflow, why? *** Locked
Goto page Previous  1, 2
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 9:27 am     Reply with quote

do you have...

#device *=16
... in the first few lines of code ?

do you use get_env() ?

memory map of registers,etc. is not the same

if you're using the 877 as the PIC in product, it's easy for competitors to read the contents(BTDT),newer PICs make it a lot harder.

hth
jay
palyancodr



Joined: 06 Jan 2014
Posts: 31

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 11:37 am     Reply with quote

I use none of those.

We have patent lawyers that can deal after math. For know it is not a good idea to share the code online that's why.
_________________
Hardware-Software Developer
Physics Engineer
Ceo airVision Aerial Video and Photography
Ceo Massive Robotics

ccs c ide version: 4.110
Pic: 16F877
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 12:39 pm     Reply with quote

So you want help on super secret and advanced 877A' code which you are clearly simulating in proteus, mean while we have to interprete what YOU interpret as the fault which is most likely proteus but your refuse to believe.

... I like this thread.

*Changes name to "Alice"
_________________
CCS PCM 5.078 & CCS PCH 5.093
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 1:18 pm     Reply with quote

Well I now know what's wrong having looked at some of my old 877 code(beats shovelling snow at -15*C) and the first 10 lines of code will show the obvious problem and the easy solution.The nice thing about using CCS C since the 16C71 is the wealth of knowledge building products with PICs.

jay
palyancodr



Joined: 06 Jan 2014
Posts: 31

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 2:27 pm     Reply with quote

Gabriel wrote:
So you want help on super secret and advanced 877A' code which you are clearly simulating in proteus, mean while we have to interprete what YOU interpret as the fault which is most likely proteus but your refuse to believe.


Why people are so proteus haters? I have the circuit. I do test every code on proteus as well as on hardware.

I also do say if i delete 4 line of printf command code works if i add it's not. This is nothin related with proteus.

Quote:
So you want help on super secret and advanced 877A' code


As you can appreciate sometimes code needs to stay hidden when it is not a backyard project.

So you gonna help me here with your 5+ years of experience:) or keep blaming proteus?
_________________
Hardware-Software Developer
Physics Engineer
Ceo airVision Aerial Video and Photography
Ceo Massive Robotics

ccs c ide version: 4.110
Pic: 16F877
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 2:37 pm     Reply with quote

I believe Temtronic made a point with you not having:

Code:
#device *=16



CCS Manual:


Quote:
3. You can switch to larger pointers for full RAM access (this takes more ROM). In PCB add *=8
to the #device and in PCM/PCH add *=16 to the #device.

Example:
#DEVICE PIC16C77 *=16

or

#include <16C77.h>
#device *=16


Quote:
So you gonna help me here with your 5+ years of experience:) or keep blaming proteus?


Right...

Quote:
Hardware-Software Developer
Physics Engineer
Ceo airVision Aerial Video and Photography
Ceo Massive Robotics


I apologize.
_________________
CCS PCM 5.078 & CCS PCH 5.093
palyancodr



Joined: 06 Jan 2014
Posts: 31

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 3:02 pm     Reply with quote

adding
Code:
#device *=16 
did not solved the problem.

Why do you think this can happen ladies and gentlemen? Do you think that 16f877 can't handle the calls? Since when i remove 4 line of printf function code works like a charm. When i add it mcu goes into restart loop.

to be much more cooperative, i use set_timer1() and get_timer1() a lot, i do fair math, there is more than fair pin interrupt(no external interrupt), there is UART com.

I will scan the code and think why this can happen?
_________________
Hardware-Software Developer
Physics Engineer
Ceo airVision Aerial Video and Photography
Ceo Massive Robotics

ccs c ide version: 4.110
Pic: 16F877
palyancodr



Joined: 06 Jan 2014
Posts: 31

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 3:05 pm     Reply with quote

Quote:
the first 10 lines of code will show the obvious problem and the easy solution


Do you need the first 10 line of code?

Quote:
(beats shovelling snow at -15*C)


stay warm;)
_________________
Hardware-Software Developer
Physics Engineer
Ceo airVision Aerial Video and Photography
Ceo Massive Robotics

ccs c ide version: 4.110
Pic: 16F877
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 3:17 pm     Reply with quote

It's kind of fun but sad to read this thread.

The original poster is working on some new product that he is trying to sell commercially, at least that is what I gather from the remark about his company's patent lawyers.
He is developing code on the ancient 877A. A good chip, but obsoleted and not recommended for new designs by Microchip and is expensive at $4.41 (when buying 1000 pieces). Many newer models exist that are better in all features: cheaper, less power usage, faster, etc. For example the recommended replacement part is the 887 for only $1.89 (at 1000 pieces).
For undisclosed reasons you want to use the old device. I'm sure your company and it's customers like wasting money.

Only 1 out of 3 questions is answered by the original poster.

All good advice is disregarded as not important.

Sorry, I'm not going to try to help you, it would be a waste of my time. But it is entertaining to see you struggle.
palyancodr



Joined: 06 Jan 2014
Posts: 31

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 3:28 pm     Reply with quote

Quote:
The original poster is working on some new product that he is trying to sell commercially, at least that is what I gather from the remark about his company's patent lawyers.
He is developing code on the ancient 877A. A good chip, but obsoleted and not recommended for new designs by Microchip and is expensive at $4.41 (when buying 1000 pieces). Many newer models exist that are better in all features: cheaper, less power usage, faster, etc. For example the recommended replacement part is the 887 for only $1.89 (at 1000 pieces).
For undisclosed reasons you want to use the old device. I'm sure your company and it's customers like wasting money.


Here how the things work at my company. We are a start up robotic company that provides UAV robotic solutions business to business. When company has a good level of selling product, me and my secret boy bands get together and find a solution to existing problem.

We are prototypers, when we have a working prototype with hand made soldering we call our production line engineers, we show them the circuit and the c code than they convert it to beautiful ARM code, so please don't judge before you fully understand.


Quote:
All good advice is disregarded as not important.

Sorry, I'm not going to try to help you, it would be a waste of my time.


Thanks for helping out and letting us know that you are not helping;)

Quote:
But it is entertaining to see you struggle.


This is how scinence and technology work.
_________________
Hardware-Software Developer
Physics Engineer
Ceo airVision Aerial Video and Photography
Ceo Massive Robotics

ccs c ide version: 4.110
Pic: 16F877
palyancodr



Joined: 06 Jan 2014
Posts: 31

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 3:40 pm     Reply with quote

As ckielstra shows, we have a common problem here. He choose being destructive instead of constructive. It is so said that how Microchip guys differ from ATMEL guys. Have a look at their forums, they are trying to help every possible way, they share their experiences and knowledge. They prefer being educative even if they can't help on problem.

It is also clearly the indicationg of sign that why every product we purchased has an ATMEL chip in it. It is because of US actually. That's why we don't have any single product has a MICROCHIP in it. Our clients and customers don't trust on it because they used to see atmel chips. That is why we have atmel developers at the company instead of MICROCHIP developers.

Have a look at this guy ckielstra, he is posting because he wants us to know that he is having fun. How beautiful is this.
_________________
Hardware-Software Developer
Physics Engineer
Ceo airVision Aerial Video and Photography
Ceo Massive Robotics

ccs c ide version: 4.110
Pic: 16F877
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Feb 27, 2014 4:20 pm     Reply with quote

Palyancodr,

OK, so you won't answer all our questions, and you won't provide even a shred of code to support your assertion that it's a stack problem. Moreover, the basis of your diagnosis comes from a very dubious source, Proteus, a piece of software we've all gone round-and-round with before! And, that makes it our problem???

My suggestion would be to ask your 'patent attorneys' for help with this issue, or complete your project with an Atmel processor, who's users are much more friendly, giving and cordial!

PCM Programmer made the right decision to bail out on this thread very early on in the process!

Good luck!

John
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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