[Sdcc-user] PIC18F2620 pragma directive problem

2007-09-11 Thread Stanley Lee
Hi, Below is a sample code that's supposed to flash 8 LEDs on port b at 5 Hz. I have modified the .h file to correspond to the one included in the latest SDCC snapshot. However, I'm not sure how to change the "#pragma config..." line to correspond to the same command in SDCC. That particular line

Re: [Sdcc-user] PIC18F2620 pragma directive problem

2007-09-14 Thread Stanley Lee
or 2: Initializer element is not constant main.c:14: error 20: Undefined identifier '__CONFIG7H' main.c:14: error 2: Initializer element is not constant main.c:18: error 20: Undefined identifier 'OSCCON' main.c:18: error 103: code not generated for 'init_cpu' due to previous

Re: [Sdcc-user] PIC18F2620 pragma directive problem

2007-09-15 Thread Stanley Lee
Hi Raphael, PIC18fregs.h is indeed in /usr/share/sdcc/include/pic16. I think the problem is that SDCC does not look into pic16 directory on its own. Only my source files are in folders with names that have white space. I did indeed install SDCC into a blank-free path, which is in /usr/share/sdcc/.

Re: [Sdcc-user] PIC18F2620 pragma directive problem

2007-09-15 Thread Stanley Lee
.c:4: Initializer element is not constant main.c:5: Undefined identifier '_BODEN_OFF_2L' main.c:5: Initializer element is not constant main.c:7: Undefined identifier '_MCLRE_MCLR_disabled_RA5_input_en_3H' main.c:7: Initializer element is not constant Thanks, Stanley On 9

[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

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 Stanley Lee
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 helps, &

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

2007-09-29 Thread Stanley Lee
in /dev/usbxxx, x being number? clean: rm -f *.o *.rel *.lst *.cod *.hex *.map *.asm# change this to your program name Thanks, Stanley On 9/29/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > > Hi Olgierd, > > I'm not 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-10-02 Thread Stanley Lee
** [LED_toggle.hex] Error 127 [end of error message] Does anyone have any idea on how to get around that? I have a feeling that it has something to do with 18f2620.lkr file. Thanks, Stanley On 9/30/07, Xiaofan Chen <[EMAIL PROTECTED]> wrote: > > On 9/30/07, Stanley Lee <[EMAIL PROTEC

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

2007-10-02 Thread Stanley Lee
fan Chen <[EMAIL PROTECTED]> wrote: > > 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 >

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

2007-10-02 Thread Stanley Lee
something wrong with the linker options, however I have trouble deducing from the Makefile what's wrong with the options. Stanley On 10/2/07, Xiaofan Chen <[EMAIL PROTECTED]> wrote: > > On 10/3/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > > > Above is with LNK = /usr/

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

2007-10-03 Thread Stanley Lee
libsdcc.lib crt0.o: No such file or directory make: *** [LED_toggle.hex] Error 1 Really sorry for the spam. Hopefully I can get into a situation to reduce the amount of help emails needed. Thanks for the help, Stanley On 10/2/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > > I didn't reali

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-06 Thread Stanley Lee
t;[EMAIL PROTECTED]> wrote: > > 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 an

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

2007-10-06 Thread Stanley Lee
ally right after external power is applied. I'm thinking of trying the same code (except for some fusebits/hardware tweaks on a PIC16F877A, PIC16F688, PIC16F690, or PIC16F628. Any suggestions if this thought is a feasible alternative to sideline the development? Cheers, Stanley On 10/6/

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

2007-10-08 Thread Stanley Lee
EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > 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

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

2007-10-09 Thread Stanley Lee
]> wrote: > > 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 p

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

2007-10-13 Thread Stanley Lee
n external power-up reset circuit for slow startups, although that never seemed to work. I'm getting lost on how to solve this reset issue. Any insights on this would be much appreciated. Thanks, Stanley On 10/9/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > > Hi Jan, > > J

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

2007-10-18 Thread Stanley Lee
x27;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 away from the computer and any other > electrical devices. :D > > On 10/14/07, Stanley Lee <[EMAIL PROTECTED]> w

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: > > > &

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

2007-10-19 Thread Stanley Lee
> 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

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-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:

[Sdcc-user] PIC18F2620 a/d module routine

2007-10-28 Thread Stanley Lee
The project folder that I have so far is in http://www.mediafire.com/?c1444jbnizc b/c the message would get otherwise too large to be posted. What I'm trying to do right now is get the a/d conversion module working, and see the output on a combination of LEDs, through USART to the computer on termi

Re: [Sdcc-user] PIC18F2620 a/d module routine

2007-10-28 Thread Stanley Lee
ECTED]> wrote: > > Hi > > Stanley Lee wrote: > > The project folder that I have so far is in > > http://www.mediafire.com/?c1444jbnizc b/c the message would get > > otherwise too large to be posted. What I'm trying to do right now is get > > the a/d conversion m

Re: [Sdcc-user] PIC18F2620 a/d module routine

2007-10-28 Thread Stanley Lee
appreciated. Thanks, Stanley On 10/28/07, Stanley Lee <[EMAIL PROTECTED]> wrote: > > Hi, > > I haven't reworked my code based on the recommendations yet, but I would > like to make a reply on some comments. > > If my application only requires me to use one a/d chann

Re: [Sdcc-user] PIC18F2620 a/d module routine

2007-10-30 Thread Stanley Lee
e sdcc are modified correctly. How would I disable adc_int in adcval function? Do I turn off all the ADIE bit when I read the a/d conversion value, and then turn it back on? Cheers, Stanley On 10/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Stanley Lee schrieb: > > Hi, &g

Re: [Sdcc-user] Fwd: PIC18F2620 a/d module routine

2007-10-30 Thread Stanley Lee
ee the adc controlling the LED toggling rate (I know that I should be using the pwm modules for this). I have disabled temporarily ADIE as recommended by Jan. Any insights? Are there still holes with the adc patches? Thanks, Stanley On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >

Re: [Sdcc-user] PIC c compiler

2007-11-22 Thread Stanley Lee
Hi Richard, Which architecture are you programming on? And what are you trying to do? Stanley On Nov 22, 2007 4:48 AM, Richard Csokas <[EMAIL PROTECTED]> wrote: > Hello, > > Can u help me, how can i find example source code or sdcc programming guide. > I'm beginner programmer in c. I like use th