• Domingo 19 de Mayo de 2024, 17:52

Autor Tema:  Necesito Ayuda Con Mi Codigo.  (Leído 1060 veces)

b_sandoval

  • Nuevo Miembro
  • *
  • Mensajes: 5
    • Ver Perfil
Necesito Ayuda Con Mi Codigo.
« en: Domingo 9 de Octubre de 2005, 03:15 »
0
Tengo un problema cuando trato de usa un compilador, muestra un error en esta linea especifica: for(col = 0;col < 32;col<<=1;){
este programa supuestamente debe mostrar la letra a en una matrix 5 x7, adjunto la direccion donde encontrar el schematic de este proyecto.

MAT_90.C

Example to drive 5 X 7 Matrix LEDs


/***********************************************
* *
* COPYRIGHT © Blitzlogic Sdn. Bhd. *
* Author : Abraham Wong 2/2/2000 *
* *
* example of driving 5 x 7 Matrix LEDs *
* *
* Compiler : IMAGECRAFT AVR C - EVAL VERSION *
* *
***********************************************/

#include < io2313.h >
#include < macros.h >

char const pat[5]={ 0x3f, 0x02, 0x04, 0x02, 0x3f };
/* PB0 0 0 1 0 0
PB1 0 1 0 1 0
PB2 1 0 0 0 1
PB3 1 1 1 1 1
PB4 1 0 0 0 1
PB5 1 0 0 0 1
PB6 1 0 0 0 1

PATTERN FOR ALPHABET A */

void wait( ){
; }


void main( void ){
unsigned char cnt, col;
unsigned int i;

PORTB = 0; /* ZERO port_a & port P3 */
PORTD = 0;

for( ;; ){
col = 1;
for (cnt=0;cnt<5;cnt++){
for(col = 0;col < 32;col<<=1;){

PORTB = pat[cnt];
PORTD = col;
for (i = 0; i < 10000; i++){ wait(); /* delay for half second */
}
}
}
}


SCHEMATIC

LeGatoRojo

  • Miembro HIPER activo
  • ****
  • Mensajes: 552
  • Nacionalidad: mx
    • Ver Perfil
    • LeGatoRojo
Re: Necesito Ayuda Con Mi Codigo.
« Respuesta #1 en: Domingo 9 de Octubre de 2005, 07:21 »
0
vaya esta pregunta otra vez, el del error en el for y el punto y coma. ;)
Un día desperte y en lugar de dientes tenía colmillos, en lugar de manos, tenía garras; pero lo más impactante fue el color escarlata de mi pelaje.