Jim, Thank you for the help, although I cannot use the __config command with the C compiler (yet!) for some reason, the webboard is definetly a big help. I appriciate it,=20 =D6mer YALHI oyalhi@teksan.com.tr http://www.teksan.com.tr Tel : +90 212 613 22 00 Fax: +90 212 544 70 35 -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Jim Ewald Sent: Wednesday, August 14, 2002 4:21 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: MPLAB C18 You can find C18 users on the Microchip development tools webboard. Point your browser at: http://asp.microchip.com/webboard/wbpx.dll/~devtools The fuses on the F18xxx MCU are set by including in-line assembler, using the __Config directive (note there are 2 underscores in __Config). There is a discussion on this topic up on the webboard. There is an additional parameter to __Config in the PIC 18Fxxx series. It is defined as: __Config mem_addr, config_bits The fuse addresses and bit maps are defined in the corresponding P18Fxxx.inc file. For example, the OCS fuse settings might look like: __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HSPLL_OSC_1H Sorry that I cannot help with your other questions. I'm still learning how to use MPASM. C will have to wait for a while. Regards, Jim -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of =D6mer Yalhi Sent: Wednesday, August 14, 2002 2:49 AM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]: MPLAB C18 I feel like I am talking to myself here, it seems that there are no MPLAB C18 users on this list, but I will give it one last chance. I have been struggling with the compiler and I have couple of questions, please help if you know anything: 1. How do you set the configuration bits programmatically? 2. How do you write and read to eeprom (I tried "rom long eTest =3D 0x1234;" but that does not seem to work, although I get no compiler warnings/errors) 3. How do you define default values in the eeprom in C? In asm I just write (org 0x2100 de "testing",0) 4. Sometimes, after I have the hex file without any compaints from the compiler, I load it to the programmer (P16PRO, and load the hex file, and I get "Checksum error in object file". Could this be because I don't have the configuration bits in the hex file? If so, how come I don't get this error all the time? The pic used is: 18F452 at 20Mhz. Please help if you know anything or at least where to get help about the C18. Regards, Omer YALHI oyalhi@teksan.com.tr http://www.teksan.com.tr Tel : +90 212 613 22 00 Fax: +90 212 544 70 35 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu