View previous topic :: View next topic |
Author |
Message |
Gauges
Joined: 24 Feb 2011 Posts: 1
|
Add Assembly Language Code Before CCS sets up C run time env |
Posted: Thu Feb 24, 2011 1:37 pm |
|
|
I need to add code to enable the watchdog timer and set up low voltage detect that executes immediately just after the microcontroller is reset.
I cannot wait for CCS to setup the C run time environment, initialize the variables, etc, etc. Setting up the watchdog must come first. This is to eliminate an EMI compliance issue.
How do I accomplish this? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Feb 24, 2011 1:54 pm |
|
|
Months ago, I emailed CCS with a request that they add a #build(noinit)
option to the compiler to leave off the start-up code. I haven't seen it
be added so I guess they blew off my suggestion. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9250 Location: Greensville,Ontario
|
|
Posted: Thu Feb 24, 2011 1:59 pm |
|
|
Ok, I have to ask, what EMI issue? Is the PIC radiating it ? airborne or through connections ?
There is no 'C runtime environment'..watchdog timer is a fuse selection..
Airborne EMI fix...put in metal box..
Connections EMI fix...add ferrites and appropriate caps on the I/Os
Need more info, if you show us a very small code example it'd help. |
|
|
|