Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-27 Thread Stanley Lee
Looks like Jan is right after I took his suggestion to increase the delay rate. The LED blinking program is working now. Finally thanks for all your help. Stanley On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Stanley Lee schrieb: > > > Configuration data: 0xc900 0x1e18 0x0700 0x00

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-25 Thread sdcc
Stanley Lee schrieb: > Configuration data: 0xc900 0x1e18 0x0700 0x0081 0xc00f 0xe00f 0x400f This config looks good to me: - XINST disabled - DEBUG = disabled - Fosc is 1001 (internal osc with clock out on ra6) One advise: Dont use FOSC=0x34 but use FOSCbits.IRCF0 etc. this makes your code more r

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-24 Thread Stanley Lee
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: [EM

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-20 Thread Xiaofan Chen
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 disabl

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-20 Thread sdcc
[EMAIL PROTECTED] wrote: > > Stanley Lee wrote: >> Hi Jan, >> >> I'm using a PICKIT 2 from Microchip. Using Jeff's pk2 command line >> program to flash my code into the program memory. Already contacted >> pickit-pro development mailing list and himself. also pls add _XINST_OFF_4L & _DEBUG_OFF

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-19 Thread Xiaofan Chen
On 10/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Try to read out the hex file after programming it to the pic and compare > the config bits. Good advice. > Then try to programm your pic with > piklab-prog --programmer=pickit2 --device=18f2620 --command=program > LED_toggle.hex > You c

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-19 Thread sdcc
Stanley Lee wrote: > Hi Jan, > > I'm using a PICKIT 2 from Microchip. Using Jeff's pk2 command line > program to flash my code into the program memory. Already contacted > pickit-pro development mailing list and himself. That could be the source of your problem. If i understand this correct in

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-19 Thread Stanley Lee
Hi Jan, I'm using a PICKIT 2 from Microchip. Using Jeff's pk2 command line program to flash my code into the program memory. Already contacted pickit-pro development mailing list and himself. Stanley On 10/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Stanley Lee wrote: > > I haven

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-19 Thread sdcc
Stanley Lee wrote: > I haven't tried pk2 on a PIC16F mcu yet. I have talked to Microchip > technical support about my problem, and they suggested that it could be > b/c of pk2 not sending the fusebit controls properly. Jan is ordering > some 2620 and working on it to see whether the same problem

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-19 Thread Stanley Lee
I am using a text editor, and then use sdcc and gplink to build and compile the file with the assistance of a makefile. I haven't tried using piklab-prog yet. I will try the Windows PICKit 2 application later tonight. Stanley On 10/19/07, Xiaofan Chen <[EMAIL PROTECTED]> wrote: > > On 10/19/07, S

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-19 Thread Xiaofan Chen
On 10/19/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > I haven't tried pk2 on a PIC16F mcu yet. I have talked to Microchip > technical support about my problem, and they suggested that it could be b/c > of pk2 not sending the fusebit controls properly. Jan is ordering some 2620 > and working on it t

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-18 Thread Stanley Lee
I haven't tried pk2 on a PIC16F mcu yet. I have talked to Microchip technical support about my problem, and they suggested that it could be b/c of pk2 not sending the fusebit controls properly. Jan is ordering some 2620 and working on it to see whether the same problem is replicated on his side. Ju

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-18 Thread soliton
It seemed the same problem happened to me with PIC16F88, my application could not run without using the USB port power supply. But I didn't change anything and it work again, very strange. Just an idea, have you tried it using 3 pieces of battery as power supply? And bring your test circuit far awa

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-13 Thread Stanley Lee
Apparently this isn't the last email on this topic. I'm not sure why this problem doesn't occur to 2220 but to 2620, as I need to use 2620 or its family chips for the purpose of my project. I've checked the pin 10 (clkout) with the oscillator fusebit set to output a clock on pin 10 as shown in the

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-09 Thread Stanley Lee
Hi Jan, Just modified your code on the PIC18F2220, and it finally worked consistently. I think what went wrong must have been with that particular PIC18F2620. Thanks for everyone's help! Last spam for me on this topic finally. Stanley On 10/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-09 Thread sdcc
Stanley Lee schrieb: > Hi, > > I have incorporated Jan's suggestions into the code, and apparently got > the same behaviour. Is it possible to get from you, Jan, the modified > code that you have for the PIC18F2220 as I try on that particular mcu? > Attached to the email is the code. that pretty

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-08 Thread Stanley Lee
Hi, I have incorporated Jan's suggestions into the code, and apparently got the same behaviour. Is it possible to get from you, Jan, the modified code that you have for the PIC18F2220 as I try on that particular mcu? Attached to the email is the code. Cheers, Stanley On 10/7/07, [EMAIL PROTECTE

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-07 Thread sdcc
Stanley Lee wrote: > Hi, > > Sorry for another email. I have received modified version of Jan's > makefile. The compilation and build process is solved. However, I am > encountering the same problem as I have experienced before, and that is > the PIC18F2620 doesn't execute the operation of blink

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-06 Thread Stanley Lee
Hi, Sorry for another email. I have received modified version of Jan's makefile. The compilation and build process is solved. However, I am encountering the same problem as I have experienced before, and that is the PIC18F2620 doesn't execute the operation of blinking the LEDs automatically right

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-06 Thread Stanley Lee
Hi, I have sent Jan a copy of the Makefile and source code. I will be testing modified version of the source code and Makefile on a PIC16F877a to see if anything different would result. Please feel free to ask me for the files if you're interested. Stanley On 10/5/07, [EMAIL PROTECTED] <[EMAIL P

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-05 Thread sdcc
Stanley Lee schrieb: > Hi, The above places for sdcc, gputils etc. look good. > > Anyway, there is one strange thing that I have found. I have modified > jan's template as shown in the attached zip file and still got the > following error message: > [error message start] > [EMAIL PROTECTED]:/med

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-04 Thread Stanley Lee
I'm not sure if my last message went through b/c of the file limits, so I guess I'll repeat the message except link the files to a file hosting site. I'll start with replying to soliton's questions first. Here are the printouts for where sdcc, gpasm and gplink are installed. [printout] [EMAIL PRO

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-03 Thread sdcc
Hi Stanley Lee wrote: > I have moved everything to /media/sda5/LED_toggle/. However, I've been > experiencing the same problem. The error message is shown below: > > [EMAIL PROTECTED]:/media/sda5/LED_toggle$ make > /usr/local//share/gputils/lkr/ -L/usr/local/share/sdcc/lib/pic16/ > --use-crt= cr

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-03 Thread soliton
On 10/3/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > Sorry for another spam. I have taken Xiaofan's suggestion and modified my > code and the Makefile to compile for PIC18F2620 instead of the architecture > in the example code. However, I have been getting error message with the " > crt0.o" file. I

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-03 Thread Stanley Lee
Sorry for another spam. I have taken Xiaofan's suggestion and modified my code and the Makefile to compile for PIC18F2620 instead of the architecture in the example code. However, I have been getting error message with the " crt0.o" file. I've tried all three combinations of "crt0.o", "crt0i.o", an

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-02 Thread Stanley Lee
I didn't realize that LNK stands for the linker binary file. Anyway, what I did for the installation of gputils and sdcc was downloading the nightly snapshots and then manually installed it rather than doing a dpkg on a debian installation file (b/c that's the only way I found initially to get the

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-02 Thread Xiaofan Chen
On 10/3/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > Above is with LNK = /usr/local/share/gputils/lkr/ That is wrong. LNK is for the linker not the linker script (LKR), ie LNK=/usr/local/bin/gplink or sdcc can be used to call the linker script. By the way, if you set up gputils and sdcc in the d

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-02 Thread Stanley Lee
I have moved everything to /media/sda5/LED_toggle/. However, I've been experiencing the same problem. The error message is shown below: [EMAIL PROTECTED]:/media/sda5/LED_toggle$ make /usr/local//share/gputils/lkr/ -L/usr/local/share/sdcc/lib/pic16/ --use-crt=crt0.o -V -Wl-s18f2620.lkr,-m -mpic16

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-02 Thread Xiaofan Chen
On 10/3/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED]:/media/sda5/Dairy Cow Research/datalogging > scale/software/LED_toggle$ make No idea of your real problem. But firstly please use short path name and try again. I am not sure if sdcc likes the spaces in the directory name. ---

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-10-02 Thread Stanley Lee
I have only read the GNU make manual up to section 4.5, but I think I have read enough of the manual to realize that the tab character is required between all commands. So I have fixed that, but have received the following error the first time through: [Makefile script] # change this to your progr

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-30 Thread Xiaofan Chen
On 9/30/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > Sorry for the additional spam, but I have a few more questions about the > Makefile as I am on the way of switching away from using piklab ide I think Piklab should work fine. If you have Piklab related problem, try ask in gnupic mailing list. T

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-30 Thread Ken Jackson
I salute the switch to the Makefile, even if it's a pain. It makes a LOT of sense to keep all the details of a compilation (commands, switches, command-line variables, etc.) in one text file which can be controlled by a version control system. Most IDEs keep that information in some proprietary p

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-30 Thread sdcc
Hi Sadly makefiles are hard to read. I usually write generic makefiles so i only need to do it once ;) Stanley Lee wrote: > PROG_NAME = LED_toggle.hex > OBJS = main.o > all: $(PROG_NAME) > > #for the .c.o directive below, do I need to replace it with the > .c .o instead of .c.o? i.e. how would I

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-30 Thread bobrob
[EMAIL PROTECTED] wrote: >I use "$< -o $@" >where you have "$+ -o $(@)". > oops, I have confused my compile and link commands. My link command uses "$^ -o $@" $^ is like $+, but with no duplicates. Randy - This SF.net em

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-30 Thread Bodo Wenzel
> Sorry for the additional spam, but I have a few more questions about the > Makefile as I am on the way of switching away from using piklab ide and > more towards using the Makefile. > [...] Please do a simple Google search with "make tutorial", and read at least two or three of them. It might he

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-30 Thread bobrob
Stanley Lee wrote: > #for the .c.o directive below, do I need to replace it with the > .c .o instead of .c.o? i.e. how would I know which > source code to compile and build? > > .c.o: >$(CC) $(CFLAGS) $(INC) -c $< I'm no expert on makefiles, but perhaps you want to use %.o : %.c I thi

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-29 Thread Stanley Lee
Sorry for the additional spam, but I have a few more questions about the Makefile as I am on the way of switching away from using piklab ide and more towards using the Makefile. The questions are embedded in the Makefile: PROG_NAME = LED_toggle.hex OBJS = main.o DEBUG = #-DUSB_USE_UART #-DDEBUG_U

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-29 Thread Stanley Lee
Hi Olgierd, I'm not connecting the usb port and the dc source at the same time. I tried each power source separately, and took note of that in the problem report. Stanley On 9/29/07, Olgierd Eysymontt <[EMAIL PROTECTED]> wrote: > > May be you are connecting the usb port and the dc source at the

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-29 Thread Olgierd Eysymontt
May be you are connecting the usb port and the dc source at the same time, in that case yo can have big currents between the computer and board. I've had similar problems with a usb oscilloscope because it's very difficult to isolate the usb bus so it's ussually referenced to ground. I hoe it help

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-29 Thread Stanley Lee
When I checked with the oscilloscope on the power supply regarding its stability, the supply voltage is very consistently regulated at 5V and the raw power supply voltage consistently at ~15V. Jan, I'm currently building the project using Piklab after I have the newest version successfully install

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-29 Thread Maarten Brock
Stanley, > How can I tell whether I have a problem with my power supply? I think the only answer can be: use an oscilloscoop and look at the value and stability of your power supply. Maarten - This SF.net email is sponsore

Re: [Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-29 Thread sdcc
Stanley Lee wrote: > Once again, thanks to Jan and Raphael for their help for getting me > started with a template for the C codes on SDCC fusebit syntax. My > newest version of the LED blinking code is posted on > http://www.dutchforce.com/~eforum/index.php?showtopic=14788. I had numerous problem

[Sdcc-user] PIC not executing using any power supply other than the computer USB port

2007-09-29 Thread Stanley Lee
Once again, thanks to Jan and Raphael for their help for getting me started with a template for the C codes on SDCC fusebit syntax. My newest version of the LED blinking code is posted on http://www.dutchforce.com/~eforum/index.php?showtopic=14788. However, I am having a problem of my PIC18F2620 n