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

pic 18F4550 bootloader problem

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



Joined: 07 Sep 2010
Posts: 2
Location: Antalya

View user's profile Send private message Visit poster's website MSN Messenger

pic 18F4550 bootloader problem
PostPosted: Mon Sep 13, 2010 6:43 am     Reply with quote

I have a running bootloader .hex file. And I have a running embedded code which was written in pic basic pro. But I don't know how to analyze and write in pic basic. I am also trying to write my own code which will be CCS C code. My code is down

This code does not run.

Note: To download my .hex code I am using Microchip USB HID bootloader ver2.2

My schema
http://320volt.com/wp-content/uploads/2010/07/pic18f4550-usb-isis-devre-semasi.png
but lcd connection change.
Code:

#include <18F4550.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN
 #use delay(clock=48000000)
#include "yeni_lcd.c"
#use fast_io(b)
#define use_portb_lcd True
#include <usb_bootloader.h>

#define _bootloader

/*
// START OF bootloader definition
#define LOADER_END 0x7FF
#define LOADER_SIZE 0x6FF
#build(reset=LOADER_END+1, interrupt=LOADER_END+9)
#org 0, LOADER_END {} // nothing will replace the bootloader memory space
// END OF bootloader definition
#org 0x1000,0x7ffe {} //bootloader()
*/

void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_ccp1(ccp_off);
setup_timer_2(T2_DISABLED,0,1);
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
setup_comparator(NC_NC_NC_NC);
enable_interrupts(GLOBAL);
setup_vref(VREF_LOW|-2);
setup_oscillator(FALSE);

set_tris_b(0x00);                   //PORTB ÇIKIS

lcd_init();

for(;;)
{
printf(lcd_putc,"\f Kazanir");
delay_ms(1000);
}

}

_________________
AR-Ge
theasus



Joined: 31 May 2009
Posts: 79

View user's profile Send private message

PostPosted: Mon Sep 13, 2010 7:16 am     Reply with quote

So what is your problem? Is your question about bootloader or your hardware? Did you try your circuit with real hardware? I'm not sure but as I know, you may not simulate bootloader application in Proteus. So you should try this circuit with real hardware.
Ehliseyf



Joined: 07 Sep 2010
Posts: 2
Location: Antalya

View user's profile Send private message Visit poster's website MSN Messenger

PostPosted: Fri Sep 24, 2010 12:45 am     Reply with quote

I solved the problem.
I used CCS C compiler v4.084 and its running.
_________________
AR-Ge
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