Author |
Message |
Topic: My Story Is Just Beginning |
avatarengineer
Replies: 29
Views: 67270
|
Forum: General CCS C Discussion Posted: Fri Sep 18, 2020 4:04 pm Subject: 4 Bitters |
Sheesh ! 4004, 8008, Dinosaurs !
in 1978/79, I was 1 of 3 guys at Mattel Toys that created the
hand held electronic games.
The only processors were PMOS and NMOS and they ate batteries.
Nat ... |
Topic: Function declaration order |
avatarengineer
Replies: 3
Views: 12520
|
Forum: General CCS C Discussion Posted: Mon Aug 31, 2020 2:33 pm Subject: int1 in structs |
int1 are created from a byte,
therefore whether you have 1 int1 or 8, both conditions use a byte.
struct {
int1 F4Khz,F2KHz,F1KHz,Blink;
int1 FastBlink,SlowBli ... |
Topic: LMT85 temperature sensor measurement |
avatarengineer
Replies: 4
Views: 14054
|
Forum: General CCS C Discussion Posted: Mon Aug 31, 2020 10:54 am Subject: Integer Math rules |
I try to avoid any floating point math due to the
speed hit and inacurracy.
Convert your formula into large integers for enough accuracy as needed.
Likely, you only need 1 degree C accuracy since t ... |
Topic: RAM corruption [solved] |
avatarengineer
Replies: 12
Views: 26348
|
Forum: General CCS C Discussion Posted: Tue Aug 11, 2020 9:13 am Subject: Mea Culpa |
My code error in a for loop accessed an area beyond an array.
I was complacent in expecting the compiler error checking to find my error.
Lessons learned, any SRAM area can be corrupted when acces ... |
Topic: RAM corruption [solved] |
avatarengineer
Replies: 12
Views: 26348
|
Forum: General CCS C Discussion Posted: Mon Aug 10, 2020 3:50 pm Subject: RAM corruption |
yes,
zeroram is in code. |
Topic: RAM corruption [solved] |
avatarengineer
Replies: 12
Views: 26348
|
Forum: General CCS C Discussion Posted: Mon Aug 10, 2020 12:34 pm Subject: SRAM issue work around [solved] |
For loop over ran assigned struct data area, uncaught in error reporting.
I found the only solution was
#reserve data space above assigned data space
until the code error was found. |
Topic: RAM corruption [solved] |
avatarengineer
Replies: 12
Views: 26348
|
Forum: General CCS C Discussion Posted: Mon Aug 10, 2020 11:44 am Subject: RAM corruption [solved] |
PICC 5093 & 5094
Found a For Loop goin out of bounds overwriting data in following addresses,
but no compiler error reported. |
Topic: No compiler error using #ROM beyond Data EEROM space |
avatarengineer
Replies: 2
Views: 10303
|
Forum: General CCS C Discussion Posted: Sat Jun 29, 2019 2:23 pm Subject: No compiler error using #ROM beyond Data EEROM space |
Compiler = PICC 5.085
Device = 16F1788 with 256 bytes of EEROM
Interest is to preload EEROM space with data;
Code:
#DEFINE EEMEMSTART getenv("EEPROM_ADDRESS")
#DEFINE EESTATMEM ... |
Topic: Dual-core dsPIC just released - dsPIC33CH |
avatarengineer
Replies: 17
Views: 41699
|
Forum: General CCS C Discussion Posted: Wed Apr 10, 2019 11:58 am Subject: dsPIC33CH looks like fun, but... |
Most of my applications might benefit from a separate engine handling live communications while another is busy with work.
Protocol parsing can use up too much time while a control loop is active. I ... |
Topic: How to ? setup_cog( ) on 16F1769 |
avatarengineer
Replies: 23
Views: 45318
|
Forum: General CCS C Discussion Posted: Sat Mar 23, 2019 4:11 pm Subject: How to ? setup_cog( ) on 16F1769 |
Old is relative.
40's years an EE, but have been programmer since 1970.
I prefer "Seasoned"... in many areas.
|
Topic: How to ? setup_cog( ) on 16F1769 |
avatarengineer
Replies: 23
Views: 45318
|
Forum: General CCS C Discussion Posted: Sat Mar 23, 2019 11:00 am Subject: How to ? setup_cog( ) on 16F1769 |
Thanks Ttelmah, but I haven't got that method to work.... yet.
It seems the 16F1769 has a personality and may require
something else in setups, some bit in the register to see the
PWM as input.
... |
Topic: How to ? setup_cog( ) on 16F1769 |
avatarengineer
Replies: 23
Views: 45318
|
Forum: General CCS C Discussion Posted: Fri Mar 22, 2019 10:47 am Subject: How to ? setup_cog( ) on 16F1769 |
I agree, never trust defaults.
My list of #Defines get so nested sometimes, I
think I'm programming in Forth.
I agree, the COG is somewhat complicated to apply,
but MicroChip doesn't have power ... |
Topic: How to ? setup_cog( ) on 16F1769 |
avatarengineer
Replies: 23
Views: 45318
|
Forum: General CCS C Discussion Posted: Thu Mar 21, 2019 2:06 pm Subject: How to ? setup_cog( ) on 16F1769 |
The odd thing is that a command to change the duty doesn't work properly if the duty wasn't initially specified in the #use statement.
I have found in the past a number of bugs with MicroChips that ... |
Topic: How to ? setup_cog( ) on 16F1769 |
avatarengineer
Replies: 23
Views: 45318
|
Forum: General CCS C Discussion Posted: Wed Mar 20, 2019 3:50 pm Subject: How to ? setup_cog( ) on 16F1769 |
Still buggy. Duty cycle misbehaves on COG1.
#DEFINE PWM1SET TIMER=2,FREQUENCY=250Khz,DUTY=50,PWM_OFF //,OUTPUT=PWMout1 // use pin select instead
#use PWM(PWM5,PWM1SET,STREAM=Buck ... |
Topic: How to ? setup_cog( ) on 16F1769 |
avatarengineer
Replies: 23
Views: 45318
|
Forum: General CCS C Discussion Posted: Wed Mar 20, 2019 2:37 pm Subject: How to ? setup_cog( ) on 16F1769 |
My application is a two stage proprietary power converter.
This is what I have working, but the pwm outputs must be defined:
#pin_select COG1A=PIN_C5
#pin_select COG1B=PIN_C4
#pin_select COG2A ... |
|