Author |
Message |
Topic: Data type conversion question |
s_mack
Replies: 7
Views: 10739
|
Forum: General CCS C Discussion Posted: Wed May 05, 2010 8:28 am Subject: Data type conversion question |
Ahh, OK thanks. Glad I asked then!
I thought (float)(equation involving vars) would convert all the vars inside the equation to be floats. No problem, I'll just make those vars signed.... in thi ... |
Topic: Data type conversion question |
s_mack
Replies: 7
Views: 10739
|
Forum: General CCS C Discussion Posted: Tue May 04, 2010 9:01 pm Subject: Data type conversion question |
Really quickly just to make sure I have this straight...
If I have:
unsigned int16 global_var = 2435;
myerror = function( 2048 )
int function( unsigned int16 local_var )
... |
Topic: Question about input (button) and variable resistance |
s_mack
Replies: 9
Views: 10875
|
Forum: General CCS C Discussion Posted: Sat Apr 03, 2010 12:42 pm Subject: Question about input (button) and variable resistance |
Also a single on/off switch will use a pull-up or pull-down resistor. Depending on the resistance value and other
circuit details, the multi-level switch function may be implementable without hardwa ... |
Topic: Question about input (button) and variable resistance |
s_mack
Replies: 9
Views: 10875
|
Forum: General CCS C Discussion Posted: Sat Apr 03, 2010 10:44 am Subject: Question about input (button) and variable resistance |
So what I think I'm getting from the last few replies... is that it is possible (I figured that) but not without hardware modification, right?
I was hoping it could be done with the existing hardwa ... |
Topic: Question about input (button) and variable resistance |
s_mack
Replies: 9
Views: 10875
|
Forum: General CCS C Discussion Posted: Fri Apr 02, 2010 1:35 pm Subject: Question about input (button) and variable resistance |
Sometimes you put multiple switches on a single line by putting resistors in series with the switches to give different voltages against the common pull-up resistor. But this arrangement has to be re ... |
Topic: Question about input (button) and variable resistance |
s_mack
Replies: 9
Views: 10875
|
Forum: General CCS C Discussion Posted: Fri Apr 02, 2010 1:30 pm Subject: Re: Question about input (button) and variable resistance |
As stated initially: I'm sorry... I'm not the engineer that designed it and I really have very limited knowledge of the electronics side. I have modest skills with the firmware programming though. M ... |
Topic: Question about input (button) and variable resistance |
s_mack
Replies: 9
Views: 10875
|
Forum: General CCS C Discussion Posted: Fri Apr 02, 2010 12:23 pm Subject: Question about input (button) and variable resistance |
Hi.
PIC18F4480
PIN_B4 input is connected to a simple momentary pushbutton switch and our code treats it as a simple on/off. Can it be used for a variable resistance type switch? I'm not sure e ... |
Topic: Does read_eeprom need a delay? |
s_mack
Replies: 5
Views: 5981
|
Forum: General CCS C Discussion Posted: Fri Oct 16, 2009 4:44 pm Subject: Does read_eeprom need a delay? |
Thanks again for your help. I just wanted to follow up in case it helps anyone else.
The code I showed above actually wasn't the problem. It certainly seemed like it because when I commented it o ... |
Topic: Does read_eeprom need a delay? |
s_mack
Replies: 5
Views: 5981
|
Forum: General CCS C Discussion Posted: Thu Oct 15, 2009 3:37 pm Subject: Does read_eeprom need a delay? |
Thanks for that. It must be something else then. I'll figure it out, thanks. |
Topic: Does read_eeprom need a delay? |
s_mack
Replies: 5
Views: 5981
|
Forum: General CCS C Discussion Posted: Thu Oct 15, 2009 3:12 pm Subject: Does read_eeprom need a delay? |
The code is mostly irrelevant anyway. At least to answer the question in the title: "Does read_eeprom need a delay". The code was there to show how read_eeprom gets called in rapid fashion ... |
Topic: Does read_eeprom need a delay? |
s_mack
Replies: 5
Views: 5981
|
Forum: General CCS C Discussion Posted: Thu Oct 15, 2009 2:33 pm Subject: Does read_eeprom need a delay? |
I'm trying to introduce code that will allow users of my device to modify certain variable values by sending messages via CANBUS to the device, which the device stores in EEPROM to be read when it pow ... |
Topic: WDT question... debugging |
s_mack
Replies: 2
Views: 4329
|
Forum: General CCS C Discussion Posted: Tue Sep 29, 2009 2:16 pm Subject: WDT question... debugging |
Thanks for the link. I'll check out the simulator. |
Topic: WDT question... debugging |
s_mack
Replies: 2
Views: 4329
|
Forum: General CCS C Discussion Posted: Tue Sep 29, 2009 1:30 pm Subject: WDT question... debugging |
Crap, I posted this a couple days ago and I was wondering why nobody was answering... now I see my post must not have taken :(
Anyway. I have a WDT issure.
PIC 18F4480
When I set WDT_OFF ( ... |
Topic: static declaration question |
s_mack
Replies: 2
Views: 5601
|
Forum: General CCS C Discussion Posted: Thu Sep 17, 2009 10:34 pm Subject: static declaration question |
I thought the initialization of it made it zero, but that's only for static. Thanks for correcting/informing me. |
Topic: static declaration question |
s_mack
Replies: 2
Views: 5601
|
Forum: General CCS C Discussion Posted: Thu Sep 17, 2009 6:52 pm Subject: static declaration question |
I'm confused about the behavior of my program as it relates to static variables.
In C , a variable declared as static is local to a particular function. It is initialised once and on leaving the fu ... |
|