Sorry for the late reply. Haven't been working on it lately since I have had trouble installing the latest edition of ubuntu on my computer that had me having to reinstall all the necessary packages. I tried to verify the config files between the mcu and the pk2.cfg. I'm getting the following:
[EMAIL PROTECTED]:/media/ssylee/Sysil Laboratories/software_projects/LED_toggle$ pk2 -config PK2 version 2.04 - 2006/12/17 pk2 -config Locating USB Microchip PICkit2 (vendor 0x04d8/product 0x0033) Found USB PICkit as device '002' on USB bus 003 Communication established. PICkit2 firmware version is 1.21.0 Device ID 0x0c80 PIC18F2620 Rev 6 found User ID: 0xffff 0xffff 0xffff 0xffff Configuration data: 0xc900 0x1e18 0x0700 0x0081 0xc00f 0xe00f 0x400f this is after performing "sudo make prog" by using the piklab-prog rather than pk2. Below is the config mask from pk2.cfg Name = PIC18F2620 Family = 16 DeviceID = 0c80 ProgSize = 32768 DataSize = 1024 SaveOsccal = 0 ; false SaveBG = 0 ; false IncludeUnusedBits = 0 ; false PgmModeEntry = P PgmMode = G WriteBurst = 16 ProgTiming = N DataTiming = D EraseMode = 2 BGMask = 0000 ConfigMask = cf00 1f1f 8700 00c5 c00f e00f 400f CPMask = c00f My problem right now is that all 8 LEDs remain on at the same time as power is applied to the system. I'm not too sure what I'm missing or what I'm doing wrong in my code. I'm somehow getting a clock of 2 Mhz for some strange reason (although I have no idea whether it's appropriate). I have attached a copy of the code in the email. Cheers, Stanley On 10/20/07, Xiaofan Chen <[EMAIL PROTECTED]> wrote: > > On 10/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > also pls add > > _XINST_OFF_4L & _DEBUG_OFF_4L > > to the __CONFIG4L register. > > after this do a make clean and recompile everything. This will > > definitely disable the extended instruction set and the background > > debug. They should be disabled by default, but just to be sure. > > > > I would not trust any compiler default and they may be changed. > This may well be the problem. It is always better to explicit to set > all the configuration bits. I understand that there are plenty of > bad examples (even from Microchip) out there. > > Xiaofan > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sdcc-user >
LED_toggle.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user