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

Problems debugging PIC16F914: ICD U-40 reads wrongs the vars

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
picoto
Guest







Problems debugging PIC16F914: ICD U-40 reads wrongs the vars
PostPosted: Wed Sep 21, 2005 4:18 am     Reply with quote

Hi everyone!

I've problems debugging a PIC16F914 with the ICD-U40 programmer/debugger

I've used this debugger for many pics (PIC18F8680, PIC16F88, PIC16F818,...) and it works fine, but when debugging PIC16F914 step by step, every var (except a few of them) is read as 0, and so, it doesn't work.

If I use the "go to cursor" feature it works fine too, the problem is when using "step by step" and reading the vars :(
Guest








PostPosted: Wed Sep 21, 2005 4:54 am     Reply with quote

I've find out something:

Declaring the vars like that:

///VARIABLES CARLOS
#define TAM_BUFFER 6
#define ack 0b10101010
#define num_retx 16
#define tiempo_retx 2
#define num_max_retx_can 64
#define tiempo_antirebotes 2;

int mensaje[8];
int buffer_state=0;
int buffer_txcan[TAM_BUFFER][10];

int contador_fallos;
int num_tx0_rtx,num_tx1_rtx,num_tx2_rtx;

int timer_retx_can;

//OTRAS
int veces_arrancado;
int cuenta_reloj;
int aux_led_salida;

//VARS reloj
int segundo,minuto,hora,dia,mes,anio;
//int array[10];


enum {mensaje_fotocelula1,mensaje_fotocelula2,mensaje_fotocelula3,mensaje_peso_ochenta,mensaje_peso_cien,mensaje_pulso_subir,mensaje_pulso_bajar,mensaje_pextra1,mensaje_pextra2,mensaje_apagar_rele_abre_puertas1,
mensaje_apagar_rele_abre_puertas2,mensaje_apagar_rele_abre_puertas3,mensaje_apagar_rele_cierra_puertas1,mensaje_apagar_rele_cierra_puertas2,mensaje_apagar_rele_cierra_puertas3,mensaje_encender_rele_abre_puertas1,
mensaje_encender_rele_abre_puertas2,mensaje_encender_rele_abre_puertas3,mensaje_encender_rele_cierra_puertas1,mensaje_encender_rele_cierra_puertas2,mensaje_encender_rele_cierra_puertas3,estado_cabina}; /* Mensajes al techo */

int timer_foto1,timer_foto2,timer_foto3,timer_ochenta,timer_cien,timer_ps,timer_pb,timer_pextra,timer_pextra2;

int timer_led;
int1 ya_insertado;
int donde_insertar;
int1 seleccionado_buffer_tx;
int16 skew_reloj;
int1 estado_anterior_foto1=0,estado_anterior_foto2=0,estado_anterior_foto3=0,estado_anterior_ochenta=0,estado_anterior_cien=0,estado_anterior_ps=0,estado_anterior_pb=0,estado_anterior_pextra=0,estado_anterior_pextra2=0;


All variables down from anio are read with value 0.

if I change the declaration of the first 3 vars, and put them at the end, like that:

///VARIABLES CARLOS
#define TAM_BUFFER 3
#define ack 0b10101010
#define num_retx 16
#define tiempo_retx 2
#define num_max_retx_can 64
#define tiempo_antirebotes 2;

int contador_fallos;
int num_tx0_rtx,num_tx1_rtx,num_tx2_rtx;

int timer_retx_can;

//OTRAS
int veces_arrancado;
int cuenta_reloj;
int aux_led_salida;

//VARS reloj
int segundo,minuto,hora,dia,mes,anio;
//int array[10];


enum {mensaje_fotocelula1,mensaje_fotocelula2,mensaje_fotocelula3,mensaje_peso_ochenta,mensaje_peso_cien,mensaje_pulso_subir,mensaje_pulso_bajar,mensaje_pextra1,mensaje_pextra2,mensaje_apagar_rele_abre_puertas1,
mensaje_apagar_rele_abre_puertas2,mensaje_apagar_rele_abre_puertas3,mensaje_apagar_rele_cierra_puertas1,mensaje_apagar_rele_cierra_puertas2,mensaje_apagar_rele_cierra_puertas3,mensaje_encender_rele_abre_puertas1,
mensaje_encender_rele_abre_puertas2,mensaje_encender_rele_abre_puertas3,mensaje_encender_rele_cierra_puertas1,mensaje_encender_rele_cierra_puertas2,mensaje_encender_rele_cierra_puertas3,estado_cabina}; /* Mensajes al techo */

int timer_foto1,timer_foto2,timer_foto3,timer_ochenta,timer_cien,timer_ps,timer_pb,timer_pextra,timer_pextra2;

int timer_led;
int1 ya_insertado;
int donde_insertar;
int1 seleccionado_buffer_tx;
int16 skew_reloj;
int1 estado_anterior_foto1=0,estado_anterior_foto2=0,estado_anterior_foto3=0,estado_anterior_ochenta=0,estado_anterior_cien=0,estado_anterior_ps=0,estado_anterior_pb=0,estado_anterior_pextra=0,estado_anterior_pextra2=0;


int mensaje[8];
int buffer_state=0;
int buffer_txcan[TAM_BUFFER][10];


then I can't compile due to "not enough RAM". If i Solve the problem (setting TAM_BUFFER to 3), now it all works perfect...

I think this is a little shoddy in a compiler worthing 600$...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go 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