Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Piclist | MPLAB C18 compiler student version

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

MPLAB C18 compiler student version - Alan Marconett - Aug 14 14:19:19 2008

Anyone familiar with the MPLAB C18 compiler student version? I'm trying to
compile the 696 example. I did get it to compile by simply executing the
.BAT file in the directory. MPLAB couldn't seem to do it. I think it has
something to do with the command line -p option. The batch file
doesn't use it.

I also attempted to modify the C file and linker file to compile for a
PIC18F4620, but was only partially successful. I had to mangle the 18cXXX.h
file. Seems the compiler defaults to an 18C252 "generic" compiler. Maybe
the "Student Version" is limited to this chip?

Alan KM6VV



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


Re: MPLAB C18 compiler student version - Dennis Clark - Aug 14 15:18:23 2008

Did you configure the project with the correct processor? The IDE does
not query the source files to find the processor. Even though you have
the correct <>.h file in the source you need to configure the project
for the correct processor. Use the Select Device to set
the correct chip. Also, there is a different linker file for each
supported device and typically two different linker files depending upon
the c018*.c file that you are using. The c018i_.c sets
everything up and works with initialized variables. The c018_.c
does not expect initialized data spaces.
So, if you were using the PIC18F4620 you would use:
c018i_4620.c if you were initializing your variables and c018_4620.c if
not. Also, you would use the 18f4620i.lkr linker file for the initialized
variable program and the 18f4620.lkr linker file otherwise.
This compiler has many many options and pragmas that can be done, you
will want to read through the documentation a bit to get a good handle
on what it can do. With the student edition though you won't get to use
the optimizing capability I believe.

have fun,
DLC

> Anyone familiar with the MPLAB C18 compiler student version? I'm trying
> to
> compile the 696 example. I did get it to compile by simply executing the
> .BAT file in the directory. MPLAB couldn't seem to do it. I think it has
> something to do with the command line -p option. The batch
> file
> doesn't use it.
>
> I also attempted to modify the C file and linker file to compile for a
> PIC18F4620, but was only partially successful. I had to mangle the
> 18cXXX.h
> file. Seems the compiler defaults to an 18C252 "generic" compiler. Maybe
> the "Student Version" is limited to this chip?
>
> Alan KM6VV
--
Dennis Clark
TTT Enterprises
------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: MPLAB C18 compiler student version - Alan Marconett - Aug 14 15:46:23 2008

I did use configure -> select to set the processor. I saw the linker file
as well. Not clear on whether I need the c018 or co18i file, I'll check
that out. Same for the linker file options.

The .BAT file offered seemed to work better, but it didn't have a p=
parameter. And the 696 C file didn't specify a processor. I'm still
looking for the proper syntax to do that in the C file. I suspect that
might be needed with other then an 18F252 processor.

I'm considering converting the 696 C file over to HiTech C, but I discovered
all the macros that were used for peripheral support. I'd like to try
running the '452 code first, before I port to another compiler and/or
processor.

Yeah, no optimizing!

Thanks!

Alan KM6VV

On Behalf Of Dennis Clark

Did you configure the project with the correct processor? The IDE does
not query the source files to find the processor. Even though you have
the correct <>.h file in the source you need to configure the project
for the correct processor. Use the Select Device to set
the correct chip. Also, there is a different linker file for each
supported device and typically two different linker files depending upon
the c018*.c file that you are using. The c018i_.c sets
everything up and works with initialized variables. The c018_.c
does not expect initialized data spaces.
So, if you were using the PIC18F4620 you would use:
c018i_4620.c if you were initializing your variables and c018_4620.c if
not. Also, you would use the linker file for the initialized
variable program and the 18f4620.lkr linker 18f4620i.lkr file otherwise.
This compiler has many many options and pragmas that can be done, you
will want to read through the documentation a bit to get a good handle
on what it can do. With the student edition though you won't get to use
the optimizing capability I believe.

have fun,
DLC

--
Dennis Clark
TTT Enterprises
------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: MPLAB C18 compiler student version - Harold Hallikainen - Aug 14 16:01:58 2008


> Anyone familiar with the MPLAB C18 compiler student version? I'm trying
> to
> compile the 696 example. I did get it to compile by simply executing the
> ..BAT file in the directory. MPLAB couldn't seem to do it. I think it
> has
> something to do with the command line -p option. The batch
> file
> doesn't use it.
>
> I also attempted to modify the C file and linker file to compile for a
> PIC18F4620, but was only partially successful. I had to mangle the
> 18cXXX.h
> file. Seems the compiler defaults to an 18C252 "generic" compiler. Maybe
> the "Student Version" is limited to this chip?
>
> Alan KM6VV
I thought the student version was the same as the full version, but
optimization only works for a month or something. I used (though years
ago) with MPLAB without trouble before getting a license.

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

C18 ADC question - Steve Nance - Aug 27 7:54:09 2008

I'm looking for some sample code that shows how to read an ADC over USB
using a 18F4550. I've looked at the MC sample code for the PICDEM FS USB
board, but it's just too tough to make sense of with all the functions it
has. I would like to find something simple if possible.

Thanks,
Steve

------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

C18 ADC question - Steve Nance - Aug 27 7:54:44 2008

I'm looking for some sample code that shows how to read an ADC over USB
using a 18F4550. I've looked at the MC sample code for the PICDEM FS USB
board, but it's just too tough to make sense of with all the functions it
has. I would like to find something simple if possible.

Thanks,
Steve

------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: C18 ADC question - Gavin Dingley - Aug 27 15:18:06 2008

Hi Steve,
from what I understand getting a PIC to communicate directly over USB is very involved. You may be better off using an FTDI chip (http://www.ftdichip.com), then programming your PIC to communicate to that using RS232 style serial.

Gavin

--- On Thu, 8/14/08, Steve Nance wrote:
From: Steve Nance
Subject: [piclist] C18 ADC question
To: p...@yahoogroups.com
Date: Thursday, August 14, 2008, 8:33 PM

I'm looking for some sample code that shows how to read an ADC over USB

using a 18F4550. I've looked at the MC sample code for the PICDEM FS USB

board, but it's just too tough to make sense of with all the functions it

has. I would like to find something simple if possible.

Thanks,

Steve



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: C18 ADC question - Dennis Clark - Aug 27 15:45:22 2008

Hi,

USB is a tough nut to crack. But if you have some experience with
embedded C programming on PIC's then you could try the Microchips PICdem
Full Speed USB demo board. It comes with source and all you need to
build up your own USB app on a board. You will need to have Microchip
C18 in your environment to use it as it comes though. I've used this
board to play around with and it is pretty nifty.
The FTDI path is far, FAR easier however.

DLC

> Hi Steve,
> from what I understand getting a PIC to communicate directly over USB is
> very involved. You may be better off using an FTDI chip
> (http://www.ftdichip.com), then programming your PIC to communicate to
> that using RS232 style serial.
>
> Gavin
>
> --- On Thu, 8/14/08, Steve Nance wrote:
> From: Steve Nance
> Subject: [piclist] C18 ADC question
> To: p...@yahoogroups.com
> Date: Thursday, August 14, 2008, 8:33 PM
>
> I'm looking for some sample code that shows how to read an ADC
> over USB
>
> using a 18F4550. I've looked at the MC sample code for the PICDEM FS USB
>
> board, but it's just too tough to make sense of with all the functions it
>
> has. I would like to find something simple if possible.
>
> Thanks,
>
> Steve
--
Dennis Clark
TTT Enterprises
------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: C18 ADC question - Steve Nance - Aug 27 16:15:31 2008

Denis & Gavin,

Thanks for your responses. Actually I already have the USB link working and
can turn LEDs on/off from a C# program. That part is working. I just need to
configure the PIC for an ADC and pass the data back to the USB client.

I am using the PICDEM FS USB Demo board and have the Micro Chip Demo C code,
but it has so many features I don't know which settings I need to use just
for the ADC.

Steve

-----Original Message-----
From: p...@yahoogroups.com [mailto:p...@yahoogroups.com] On Behalf Of
Dennis Clark
Sent: Wednesday, August 27, 2008 2:45 PM
To: p...@yahoogroups.com
Subject: Re: [piclist] C18 ADC question

Hi,

USB is a tough nut to crack. But if you have some experience with
embedded C programming on PIC's then you could try the Microchips PICdem
Full Speed USB demo board. It comes with source and all you need to
build up your own USB app on a board. You will need to have Microchip
C18 in your environment to use it as it comes though. I've used this
board to play around with and it is pretty nifty.
The FTDI path is far, FAR easier however.

DLC

> Hi Steve,
> from what I understand getting a PIC to communicate directly over USB is
> very involved. You may be better off using an FTDI chip
> (http://www.ftdichip.com), then programming your PIC to communicate to
> that using RS232 style serial.
>
> Gavin
>
> --- On Thu, 8/14/08, Steve Nance wrote:
> From: Steve Nance
> Subject: [piclist] C18 ADC question
> To: p...@yahoogroups.com
> Date: Thursday, August 14, 2008, 8:33 PM
>
> I'm looking for some sample code that shows how to read an ADC
> over USB
>
> using a 18F4550. I've looked at the MC sample code for the PICDEM FS USB
>
> board, but it's just too tough to make sense of with all the functions it
>
> has. I would like to find something simple if possible.
>
> Thanks,
>
> Steve
>

--
Dennis Clark
TTT Enterprises

------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )