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

Simple circuit but something wrong?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
GoldServe



Joined: 27 Jun 2005
Posts: 10

View user's profile Send private message

PostPosted: Thu Jun 30, 2005 8:25 pm     Reply with quote

ckielstra wrote:
Which compiler version are you using?

I compiled your first version in v3.226 and the configuration looks ok. I don't have the hardware so couldn't confirm a correct timing.


I'm using compiler version 3.200

Quote:
This is strange, why is the voltage not dropping to 0V? Are you sure GP1 is now configured as an input?


I have removed #use_fastio(a) and all references to GPIO. Someone said that the pins on the IC are configured default for input until I use them as output. Correct me if I am wrong please. Thanks.
GoldServe



Joined: 27 Jun 2005
Posts: 10

View user's profile Send private message

PostPosted: Thu Jun 30, 2005 8:30 pm     Reply with quote

Ttelmah wrote:
GoldServe wrote:
How i'm measuring it is from the time I turn the PIC on, I count 3 seconds and the output from the LDO goes high to ~3V. When I count another 3 seconds, I'll see the voltage try to dip to 2.8V and then go back to 3V.

Count?...
Have you tried a watch?.
A lot of people can count quite reasonably for reasonable intervals, but go '1', 'and2', 'and3' etc., And are a good half second 'early' on the first few counts. If you are 'counting' time, you need to use something like 'thousandand1', 'thousandand2' etc..
How has the internal timing 'tweak' value been stored/kept during reprogramming?. The internal RC oscillator, is normally pretty accurate, but this tweak value must be maintained if the oscillator is going to be reasonably accurate.

Best Wishes


I think my programmer will program up to 3EE or something like that, just before the last address. I don't need a totally accurate time but within 50ms is good enough.
GoldServe



Joined: 27 Jun 2005
Posts: 10

View user's profile Send private message

PostPosted: Thu Jun 30, 2005 8:31 pm     Reply with quote

Ttelmah wrote:
GoldServe wrote:
How i'm measuring it is from the time I turn the PIC on, I count 3 seconds and the output from the LDO goes high to ~3V. When I count another 3 seconds, I'll see the voltage try to dip to 2.8V and then go back to 3V.

Count?...
Have you tried a watch?.
A lot of people can count quite reasonably for reasonable intervals, but go '1', 'and2', 'and3' etc., And are a good half second 'early' on the first few counts. If you are 'counting' time, you need to use something like 'thousandand1', 'thousandand2' etc..
How has the internal timing 'tweak' value been stored/kept during reprogramming?. The internal RC oscillator, is normally pretty accurate, but this tweak value must be maintained if the oscillator is going to be reasonably accurate.

Best Wishes


I think my programmer will program up to 3EE or something like that, just before the last address. I don't need a totally accurate time but within 50ms is good enough.
ckielstra



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

View user's profile Send private message

PostPosted: Fri Jul 01, 2005 5:19 am     Reply with quote

Quote:
I'm using compiler version 3.200
This version was not considered a stable version and many bugs have been solved in the first months after this release. I don't have your version so can't check the generated code for that version. Because of the many problems in that version I suggest you use the last stable version v3.191, or one of the newer releases.

Quote:
Someone said that the pins on the IC are configured default for input until I use them as output. Correct me if I am wrong please.
You are correct (as long as you don't call #use_fastio).

A small improvement would be to disable the weak-pull ups, for this chip they are enabled by default. The pull-up resistors will generate a small current through the led.

In your sample code you are only switching the led1 output. Make sure the other led port is initialized to an output with a logic 0. Otherwise that port will be an input with pull-up resistor activating the led driver.
Display posts from previous:   
Post new topic   Reply to topic    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