Hi,
I have some code that amongst other things is outputing some AT commands to a Siemens phone via putc().
I'm using a picf16lf876. I have a large character array (45 characters) defined and various other variables and everything works fine, however when I try and define a second array of 40 chars, putc() no longer operates reliably.
Examining the output on a scope shows bit widths larger than they should be which results in extra 0's or 1's being seen when there are 3 or more of them in a row.
I'm nowhere near exausting the RAM (these guys have 368 bytes and I have the 16 bit pointers enabled), memory usage is about 50% at worse case.
Even weirder is that I can increase the size of my original array to 85 chars with no ill effects on putc.
Literally commenting/uncommenting the declaration of this second character array makes putc() work/not work.
Anyone have any idea what's going on, how can an extra character array be affecting the bit timing in putc()?
Cian
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Feb 13, 2004 12:51 pm
Quote:
I'm using a picf16lf876. I have a large character array (45 characters) defined and various other variables and everything works fine, however when I try and define a second array of 40 chars, putc() no longer operates reliably.
Examining the output on a scope shows bit widths larger than they should be which results in extra 0's or 1's being seen when there are 3 or more of them in a row.
The implication is that you're using a software USART for this.
Is that true ?
The 16LF876 has a hardware USART. Can you use that instead ?
Can you create and post a small program that shows the problem ?
What is the version of your compiler ?
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