First page Back Continue Last page Graphics
Initialization
- Void main(void)
- {
- -
- - various initializations
- - performed once upon startup
- - for the PIC and webserver
- -
- while(1)
- {
- - various actions to
- - be repeated forever
- }
- }
- In websrv65_v310/src/mxwebsrvr.c
- The Modtronix server initialization begins at main()
- Followed by an infinite loop
- Insert the following initialization HERE
- //-------------------------------------------------
- // Set ADCON1:
- // b5=0, b4=0 ==> Vref+ = VDD, Vref- = VSS
- // b3, b2, b1, b0 = 1011 ==> AN0-3 Analog, AN4-11 Digital
- //-------------------------------------------------
- ADCON1 = 0x0B;
- for (isamp=0; isamp<ADC_CHANNELS; isamp++)
- AdcValues[isamp] = 0;
- //-------------------------------------------------
- // Make RF7,6,5,4 all outputs -- transducer board address
- //-------------------------------------------------
- TRISF = 0x00;
- Set PIC inputs and outputs for interface modules
- Initialize the AdcValues array