CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Using MPLAB with CCS compiler to generate hex file to ECIO40

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
angielaz



Joined: 15 Jun 2009
Posts: 2

View user's profile Send private message

Using MPLAB with CCS compiler to generate hex file to ECIO40
PostPosted: Wed Jul 01, 2009 5:24 am     Reply with quote

Hi all!

I'm trying to use MPLAB with CCS compiler in order to generate the hex file for the ECIO40P which is a USB product from matrix multimedia. This product has a PIC18F4455.

Does anyone tried something similar?

For now I'm just trying to put a led blinking in port B0.

The code I'm using is:
Code:

#include <18F4455.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP
//,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN
#use delay(clock=48000000)

void main()
{
    output_low(PIN_B0);
   
    while(1)
    {
        output_high(PIN_B0);
        delay_ms(1000);
        output_low(PIN_B0);
        delay_ms(1000);
    }

}

I'm able to build the project and flash the ECIO... but the behavior is not the one I expected. The ECIO is always plugging in and out of the computer.. the PC is always playing the sound like if I was plugging in and out an USB device.
I'm new using PIC and MPLAB... so I'm out of ideas.

Can you give me some help?

Thanks in advance,
Ângela
angielaz



Joined: 15 Jun 2009
Posts: 2

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 9:40 am     Reply with quote

ok... is it possible and I found out what was missing.

the usb_booloader.h

Code:
///////////////////////////////////////////////////////////////////////////
////                     USB_BOOTLOADER.H                              ////
////                                                                   ////
////                                                                   ////
///////////////////////////////////////////////////////////////////////////
//how big is the bootloader?
//the bootloader will reside from address 0x0000 to this location.  the
//application will then sit at this location+1 to the end of program memory.
#define LOADER_SIZE                 (0xFFF)
#define LOADER_START                (0)
#define LOADER_END                  (LOADER_SIZE)
#define APPLICATION_START           (LOADER_SIZE+1)
#define APPLICATION_END             (getenv("PROGRAM_MEMORY")-1)
#define APPLICATION_ISR             (APPLICATION_START+8)

#ifndef _bootloader
 //in the application, this moves the reset and isr vector out of the bootload
 //space.  it then reserves the loader space from being used by the application.
 #build(reset=APPLICATION_START, interrupt=APPLICATION_ISR)
 #org 0, LOADER_END {}
#endif

and I got the led blinking.
Now I only need to put the PIC communicating by USB and with the PC in execution time.... any good examples?

thanks!!

Regards,
Ângela

Regards,
Ângela
vhdl
Guest







not working
PostPosted: Mon Feb 15, 2010 1:28 pm     Reply with quote

do you have other example to compile ecio40 from ccs?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group