We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, How can I config the UCFG1 ( system configuration for clock, watchdog enz ) for a LPC controller in C ? And how can I use the 32 bytes eprom ? I tried the following but the compiler returnes an error //xdata char _at_ 0x10 ; //xdata char UCFG1 _at_ 0xFD00 = 6; //xdata char UCFG1 = 8 _at_ 0xFD00; //xdata char UCFG1 _at_ 0xFD00 = 0x7B; //pdata const UCFG1 _at_ 0xFD00=4; //pdata const UCFG1 _at_ 0xFD00; //UCFG1=222;// not an error here // but it does't work either thanx! geert
If you know how to do it in Keil assembler, why not just do it in assembler!? In this case, I don't think there is anything to gain in doing it in 'C'; in fact, assembler might even be better, as it allows you to write numbers in binary - which is easier to read when you're setting bit patterns (in 'C', you'd have to convert it to Hex). Just create a little assembler file to set these two ROM "registers" - you don't even have to worry about C/Assembler interfacing, as there is nothing to "call" or be called; it just sets these 2 locations at build time.