| Electronic Components Datasheet Search |
|
AN3995 Datasheet(PDF) 31 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3995 Datasheet(HTML) 31 Page - STMicroelectronics |
|
31 / 49 page ![]() AN3995 e200z4d initialization and example code Doc ID 022384 Rev 2 31/49 3.3 The e200z4d example code After the basics initialization (see Section 3.2: e200z4d device configuration from C code), the user configures the output pin (PE[4]) on which is connected a led (see e200z4d Core in RM0070, see Section C.1: Reference document), the e200z4d core toggles the pin and then loops forever (see Figure 25). In the meantime, the e200z0h core executes a similar code to toggle a led through a contiguous port pin. Figure 25. Application code: the main function int main(int argc, char *argv[]){ Environment_Init(); /* Basic device Initilaizations */ /* (Modes,Pll,Start core 1,...) */ /* Example Code start here */ /* Loop forever Flashing an LED connected to Port PE[4] */ /* (core Z0 code blink contiguous led) */ SIU.PCR[PIN_NUMBER].R = 0x0200; /* PE[4] to GPIO mode, output */ while(1){ /* Invert LED output */ SIU.GPDO[PIN_NUMBER].R = (~(SIU.GPDO[PIN_NUMBER].R) & 0x01); for (count=0; count<1000000; count++); /* wait a while */ }; return 0; } /* End Of Main */ |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |