Autor Tema: Ayuda para una novata  (Leído 3867 veces)

0 Usuarios y 2 Visitantes están viendo este tema.

Desconectado yolanda_p

  • PIC10
  • *
  • Mensajes: 4
Ayuda para una novata
« en: 19 de Agosto de 2005, 05:41:00 »
Soy novata en esto de los pics

Me surgen un monton de dudas.

La primera de ellas es que compilador de c elegir, bien el cc18 o el pcw compiler.
El problema es que he de hacer un programa para el pic 18f2550 y por algunos mensajes de otras personas que he leido en este mismo foro no hay driver de Ccs para el pic que me interesa

La segunda duda es: Si escribo en el pic un procedimiento para multiplicar dos números a y b, devolviendo el resultado.
Como puedo llamar desde un programa escrito por mi ese procedimiento ?

En fin, como vereis son dudas de novata, me surgen muchísimas mas pero no me atrevo a ponerlas todas.

Que no se me olvide. Gracias a Jaime (J1MWeB) por orientarme a este foro

Saludos

Yolanda

Desconectado piriots

  • Colaborador
  • PIC24F
  • *****
  • Mensajes: 609
RE: Ayuda para una novata
« Respuesta #1 en: 19 de Agosto de 2005, 05:52:00 »
Primero bienvenida el foro!!Yo te recomiendo el pcw, es el que encontraras mas meterial. Que no hay driver para el 18f2550?? Pues yo si tengo en la version 3.222. En la segunda pregunta te refieres a llamar una funcion que te hace una multiplicacion?? Si lo que quieres es poder usar la variable donde guardas el resultado des de cualquier lugar del programa solo tienes que usar una variable global

static int variable;

No se si es esto a lo que te referias es que no entendi muy bien la pregunta.

Salu2

Desconectado yolanda_p

  • PIC10
  • *
  • Mensajes: 4
RE: Ayuda para una novata
« Respuesta #2 en: 19 de Agosto de 2005, 06:03:00 »
Gracias piriots

A ver como me explico porque como te digo estoy hecha un lio

El 18f2550 necesita un driver, programa escrito en c o archivo .h para incluir en mi programa y que pueda comunicarme por el Usb con el.
Ese es el código que yo no encuentro
He visto un ejemplo para C18 pero lo veo mas lioso y el Pcw me parece mas cercano al Builder C que estoy acostumbrada a usar

En cuanto a la función de multiplicar intentaré aclararlo

Pongamos que escribo una funcion en el pic para que me multiplique 2 numeros y me devuelva el resultado (por el Usb en mi caso) a un programa externo escrito por mi en Borland Builder C

La funcion podria ser: int multiplicar(int a; int b); mas o menos

Como puedo hacer la llamada desde mi programa escrito en Builder C a la funcion multiplicar que tengo en el pic ?

No se si ahora me has entendido

Perdonad mi torpeza pero ya os digo que soy novata del todo en esto

Saludos

Yolanda

Desconectado piriots

  • Colaborador
  • PIC24F
  • *****
  • Mensajes: 609
RE: Ayuda para una novata
« Respuesta #3 en: 19 de Agosto de 2005, 06:10:00 »
A vale ahora si que te entiendo y com te he dicho antes el include para el 18f2550 y ccs yo lo tengo, si lo quieres dejame una direcion y te lo mando. Y sobre lo otro no te puedo ayudar ya que de USB no tengo ni idea.

Salu2

Desconectado vszener

  • Moderador Local
  • PIC24H
  • *****
  • Mensajes: 2395
RE: Ayuda para una novata
« Respuesta #4 en: 19 de Agosto de 2005, 06:12:00 »
Buenas yolanda_p ke tal!!!! bien decirte que el include que tu pides en la version del CCS 3.227 esta, su nombre es pic18_usb.h aqui te la posteo:

/////////////////////////////////////////////////////////////////////////
////                          pic18_usb.c                            ////
////                                                                 ////
////  Microchip PIC18Fxx5x Hardware layer for CCS"s PIC USB driver   ////
////                                                                 ////
//// This file is part of CCS"s PIC USB driver code, which includes: ////
////   usb_desc_*.h - an example set of config and device descriptor ////
////   usb.c - USB token and request handler code                    ////
////   usb.h - definitions, prototypes and global variables          ////
////                                                                 ////
//// The following examples are provided by CCS:                     ////
////   ex_usb_mouse.c - A HID Mouse.                                 ////
////   ex_usb_hid.c - A custom application using HID protocol.       ////
////   ex_usb_kbmouse.c - A HID Mouse/Keyboard combo using multiple  ////
////                      interfaces.                                ////
////   ex_usb_kbmouse.c - A HID Mouse/Keyboard combo using multiple  ////
////                      HID Reports.                               ////
////   ex_usb_scope.c - A digital oscilloscope using a custom        ////
////                    protocol requiring custom Windows drivers.   ////
////                                                                 ////
////   *************************  NOTE  **************************   ////
////  If you are not using internal pullups, you will need to put    ////
////  an internal pullup resistor on C4 or C5 depending on if you    ////
////  want to use slow speed or full speed.  This code configures    ////
////  the device to use internal pullups, see usb_init() if you      ////
////  want to change that.                                           ////
////                                                                 ////
////  You need approximately 470nF cap on C3, even if you are using  ////
////  the internal 3.3V USB regulator.                               ////
////                                                                 ////
////  To run at full speed, you must use the oscillator              ////
////  configuration (PLLx) to set the PLL divide to 4MHz.  You can   ////
////  configure the MCU clock to any speed (up to 48MHz) but the     ////
////  PLL must run at 4Mhz to provide the USB peripheral with a      ////
////  96MHz clock.  See the datasheet for details.                   ////
////                                                                 ////
////  To run at slow speed you must configure your MCU to run at     ////
////  24Mhz.  See the datasheet for details.                         ////
////                                                                 ////
////   *************************  NOTE  **************************   ////
//// This driver uses INT_USB.  It requires INT_USB to interrupt the ////
//// PIC when an event has happened on the USB Bus.  Therfore        ////
//// this code enables interrupts.  A user modification can be made  ////
//// to poll the USB interrupt flag instead of relying on an         ////
//// interrupt.                                                      ////
////                                                                 ////
////    ****************   USER FUNCTIONS  ***********************   ////
////                                                                 ////
//// usb_init() - Initializes the USB stack, the USB peripheral and  ////
////              attaches the unit to the usb bus.  Enables         ////
////              interrupts.                                        ////
////                                                                 ////
//// usb_init_cs() - A smaller usb_init(), does not attach unit      ////
////              to usb bus or enable interrupts.                   ////
////                                                                 ////
//// usb_put_packet() - Sends one packet to the host.                ////
////                    If you need to send a message that spans     ////
////                    more than one packet then see usb_puts() in  ////
////                    usb.c                                        ////
////                                                                 ////
//// usb_kbhit() - Returns true if OUT endpoint contains data from   ////
////               host.                                             ////
////                                                                 ////
//// usb_get_packet() - Gets one packet that from the host.          ////
////                    usb_kbhit() must return true before you call ////
////                    this routine or your data may not be valid.  ////
////                    Once usb_kbhit() returns true you want to    ////
////                    call this as soon as possible to get data    ////
////                    out of the endpoint buffer so the PC can     ////
////                    start sending more data, if needed.          ////
////                    This only receives one packet, if you are    ////
////                    trying to receive a multi-packet message     ////
////                    see usb_gets() in usb.c.                     ////
////                                                                 ////
//// usb_detach() - De-attach USB from the system.                   ////
////                                                                 ////
//// usb_attach() - Attach USB to the system.                        ////
////                                                                 ////
//// usb_attached() - Returns TRUE if the device is attached to a    ////
////                  USB cable.  A macro that looks at the defined  ////
////                  connection sense pin.                          ////
////                                                                 ////
//// usb_task() - Keeps track of connection sense, calling           ////
////              usb_detach() and usb_attach() when needed.         ////
////                                                                 ////
//// For more documentation on these functions read the comments at  ////
//// each function.                                                  ////
////                                                                 ////
//// The other functions defined in this file are for use by the     ////
//// USB code, and is not meant to be used by the user.              ////
////                                                                 ////
/////////////////////////////////////////////////////////////////////////
////                                                                 ////
//// Version History:                                                ////
////                                                                 ////
////   06-20-05: Initial Release                                     ////
////                                                                 ////
////   05-13-05: Beta Release (Full Speed works)                     ////
////                                                                 ////
////   03-21-05: Initial Alpha Release                               ////
////                                                                 ////
/////////////////////////////////////////////////////////////////////////
////        (C) Copyright 1996,2005 Custom Computer Services         ////
//// This source code may only be used by licensed users of the CCS  ////
//// C compiler.  This source code may only be distributed to other  ////
//// licensed users of the CCS C compiler.  No other use,            ////
//// reproduction or distribution is permitted without written       ////
//// permission.  Derivative programs created using this software    ////
//// in object code form are not restricted in any way.              ////
/////////////////////////////////////////////////////////////////////////

#IFNDEF __USB_HARDWARE__
#DEFINE __USB_HARDWARE__

//let the USB Stack know that we are using a PIC with internal USB peripheral
#DEFINE __PIC__   1   

#ifndef USB_USE_FULL_SPEED
 #define USB_USE_FULL_SPEED   TRUE
#endif

#ifndef USB_CON_SENSE_PIN
#define USB_CON_SENSE_PIN  0
#endif

#if USB_USE_FULL_SPEED==FALSE
 //slow speed requires 8byte max packet size for endpoint 0
 #DEFINE USB_MAX_EP0_PACKET_LENGTH   8    
#else
 //for full speed you can still use 8bytes, but 64 may be faster
 #DEFINE USB_MAX_EP0_PACKET_LENGTH   8  
#endif

#INCLUDE <usb.h>

#define USB_BUFFER_NEEDED (USB_EP0_TX_SIZE+USB_EP0_RX_SIZE+USB_EP1_TX_SIZE+USB_EP1_RX_SIZE+USB_EP2_TX_SIZE+USB_EP2_RX_SIZE+USB_EP3_TX_SIZE+USB_EP3_RX_SIZE+USB_EP4_TX_SIZE+USB_EP4_RX_SIZE+USB_EP5_TX_SIZE+USB_EP5_RX_SIZE+USB_EP6_TX_SIZE+USB_EP6_RX_SIZE+USB_EP7_TX_SIZE+USB_EP7_RX_SIZE+USB_EP8_TX_SIZE+USB_EP8_RX_SIZE+USB_EP9_TX_SIZE+USB_EP9_RX_SIZE+USB_EP10_TX_SIZE+USB_EP10_RX_SIZE+USB_EP11_TX_SIZE+USB_EP11_RX_SIZE+USB_EP12_TX_SIZE+USB_EP12_RX_SIZE+USB_EP13_TX_SIZE+USB_EP13_RX_SIZE+USB_EP14_TX_SIZE+USB_EP14_RX_SIZE+USB_EP15_TX_SIZE+USB_EP15_RX_SIZE)

#if (USB_BUFFER_NEEDED > 0x2FF)
 #error You are trying to allocate more memory for endpoints than the PIC can handle
#endif

#reserve 0x400:0x500+USB_BUFFER_NEEDED

#define debug_usb(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z)
//#define debug_usb printf
//#define debug_putc putc_tbe

//if you are worried that the PIC is not receiving packets because a bug in the
//DATA0/DATA1 synch code, you can set this to TRUE to ignore the DTS on
//receiving.
#ifndef USB_IGNORE_RX_DTS
 #define USB_IGNORE_RX_DTS FALSE
#endif

#ifndef USB_IGNORE_TX_DTS
 #define USB_IGNORE_TX_DTS FALSE
#endif

//if you enable this it will keep a counter of the 6 possible errors the
//pic can detect.  disabling this will save you ROM, RAM and execution time.
#ifndef USB_USE_ERROR_COUNTER
   #define USB_USE_ERROR_COUNTER FALSE
#endif

#define USB_PING_PONG_MODE_OFF   0  //no ping pong
#define USB_PING_PONG_MODE_E0    1  //ping pong endpoint 0 only
#define USB_PING_PONG_MODE_ON    2  //ping pong all endpoints

//NOTE - PING PONG MODE IS NOT SUPPORTED BY CCS!
#ifndef USB_PING_PONG_MODE
   #define USB_PING_PONG_MODE USB_PING_PONG_MODE_OFF
#endif

#if USB_USE_ERROR_COUNTER
   int ERROR_COUNTER[6];
#endif

//---pic18fxx5x memory locations
#byte UFRML   =  0xF66
#byte UFRMH   =  0xF67

#byte UIR     =  0xF68
#BIT UIR_SOF = UIR.6
#BIT UIR_STALL = UIR.5
#BIT UIR_IDLE = UIR.4
#BIT UIR_TRN = UIR.3
#BIT UIR_ACTV = UIR.2
#BIT UIR_UERR = UIR.1
#BIT UIR_URST = UIR.0

#byte UIE     =  0xF69
#BIT UIE_SOF = UIE.6
#BIT UIE_STALL = UIE.5
#BIT UIE_IDLE = UIE.4
#BIT UIE_TRN = UIE.3
#BIT UIE_ACTV = UIE.2
#BIT UIE_UERR = UIE.1
#BIT UIE_URST = UIE.0

#byte UEIR    =  0xF6A
#byte UEIE    =  0xF6B

#byte USTAT   =  0xF6C

#byte UCON    =  0xF6D
#bit UCON_SE0=UCON.5
#bit UCON_PKTDIS=UCON.4
#bit UCON_USBEN=UCON.3
#bit UCON_SUSPND=UCON.1

#byte UADDR   =  0xF6E

#byte UCFG    =  0xF6F

#define  UEP0_LOC 0xF70

#byte UEP0    =  0xF70

#define USB_Buffer 0x500

#byte BD0STAT  =  0x400
#byte BD0CNT  =  0x401
#byte BD0ADRL  =  0x402
#byte BD0ADRJ  =  0x403

#define BD0STAT_LOC 0x400
#define BD0CNT_LOC  0x401
#define BD0ADRL_LOC 0x402
#define BD0ADRH_LOC 0x403

#define UEP(x) *(UEP0_LOC+x)

#if (USB_PING_PONG_MODE==USB_PING_PONG_MODE_OFF)
 #define EP_BDxST_O(x)    *(BD0STAT_LOC + x*8)
 #define EP_BDxCNT_O(x)    *(BD0CNT_LOC + x*8)
 #define EP_BDxADR_O(x)   *(int16 *)(BD0ADRL_LOC + x*8)
 #define EP_BDxST_I(x)    *(BD0STAT_LOC + 4 + x*8)
 #define EP_BDxCNT_I(x)    *(BD0CNT_LOC + 4 + x*8)
 #define EP_BDxADR_I(x)   *(int16 *)(BD0ADRL_LOC + 4 + x*8)
#else
#error Right now this driver only supports no ping pong
#endif

//See UEPn (0xF70-0xF7F)
#define ENDPT_DISABLED   0x00   //endpoint not used
#define ENDPT_IN_ONLY   0x02    //endpoint supports IN transactions only
#define ENDPT_OUT_ONLY   0x04    //endpoint supports OUT transactions only
#define ENDPT_CONTROL   0x06    //Supports IN, OUT and CONTROL transactions - Only use with EP0
#define ENDPT_NON_CONTROL 0x0E  //Supports both IN and OUT transactions

//Define the states that the USB interface can be in
enum {USB_STATE_DETACHED=0, USB_STATE_ATTACHED=1, USB_STATE_POWERED=2, USB_STATE_DEFAULT=3,
    USB_STATE_ADDRESS=4, USB_STATE_CONFIGURED=5} usb_state=0;

//--BDendST has their PIDs upshifed 2
#define USB_PIC_PID_IN       0x24  //device to host transactions
#define USB_PIC_PID_OUT      0x04  //host to device transactions
#define USB_PIC_PID_SETUP    0x34  //host to device setup transaction

#define USTAT_IN_E0        4
#define USTAT_OUT_SETUP_E0 0

#define __USB_UIF_RESET    0x01
#define __USB_UIF_ERROR    0x02
#define __USB_UIF_ACTIVE   0x04
#define __USB_UIF_TOKEN    0x08
#define __USB_UIF_IDLE     0x10
#define __USB_UIF_STALL    0x20
#define __USB_UIF_SOF      0x40

#if USB_USE_ERROR_COUNTER
 #define STANDARD_INTS 0x3F
#else
 #define STANDARD_INTS 0x3D
#endif

#define __USB_UCFG_UTEYE   0x80
#define __USB_UCFG_UOEMON  0x40
#define __USB_UCFG_UPUEN   0x10
#define __USB_UCFG_UTRDIS  0x08
#define __USB_UCFG_FSEN    0x04

#if USB_USE_FULL_SPEED
   #define __UCFG_VAL_ (__USB_UCFG_UPUEN | __USB_UCFG_FSEN | USB_PING_PONG_MODE)
#else
   #define __UCFG_VAL_ (__USB_UCFG_UPUEN | USB_PING_PONG_MODE);
#endif

char usb_ep0_rx_buffer[USB_MAX_EP0_PACKET_LENGTH];
#locate usb_ep0_rx_buffer=0x500

char usb_ep0_tx_buffer[USB_MAX_EP0_PACKET_LENGTH];
#locate usb_ep0_tx_buffer=0x500+USB_MAX_EP0_PACKET_LENGTH

int16 __usb_kbhit_status;

int8 __setup_0_tx_size;

//interrupt handler, specific to PIC18Fxx5x peripheral only
void usb_handle_interrupt();
void usb_isr_rst();
void usb_isr_uerr();
void usb_isr_sof(void);
void usb_isr_activity();
void usb_isr_uidle();
void usb_isr_tok_dne();
void usb_isr_stall(void);
void usb_init_ep0_setup(void);

//following functions standard part of CCS PIC USB driver, and used by usb.c
void usb_init();
void usb_detach();
int1 usb_put_packet(int endpoint, int * ptr, int len, USB_DTS_BIT tgl);
int1 usb_flush_in(int8 endpoint, int8 len, USB_DTS_BIT tgl); //marks the transmit buffer as ready for transmission
int8 usb_get_packet(int8 endpoint, int8 * ptr, int8 max);
void usb_flush_out(int8 endpoint, USB_DTS_BIT tgl);
void usb_stall_ep(int8 endpoint);
void usb_unstall_ep(int8 endpoint);
int1 usb_endpoint_stalled(int8 endpoint);
void usb_set_address(int8 address);
void usb_set_configured(int config);
void usb_disable_endpoints(void);

//// BEGIN User Functions:

#define debug_display_ram(x,y)
/*
void debug_display_ram(int8 len, int8 *ptr) {
   int8 max=16;
   debug_usb(debug_putc,"%U - ",len);
   if (max>len) {max=len;}
   while(max--) {
      debug_usb(debug_putc,"%X",*ptr);
      len--;
      ptr++;
   }
   if (len) {debug_usb(debug_putc,"..."Giño;}
}
· Nos vemos en los bares!!!!!
· Mi Blog: Aqueronte

Desconectado vszener

  • Moderador Local
  • PIC24H
  • *****
  • Mensajes: 2395
RE: Ayuda para una novata
« Respuesta #5 en: 19 de Agosto de 2005, 06:13:00 »
CONTINUA AKI:

*/

/******************************************************************************
/* usb_attached()
/*
/* Summary: Returns TRUE if the device is attached to a USB cable
/*
/*****************************************************************************/
#if USB_CON_SENSE_PIN
 #define usb_attached() input(USB_CON_SENSE_PIN)
#else
 #define usb_attached() TRUE
#endif

/******************************************************************************
/* usb_detach()
/*
/* Summary: Remove the D+/D- lines from the USB bus.  Basically, disable USB.
/*
/*****************************************************************************/
void usb_detach(void) {  //done
   UCON=0;  //disable USB hardware
   UIE=0;   //disable USB interrupts
   usb_state=USB_STATE_DETACHED;
   usb_token_reset();              //clear the chapter9 stack
   __usb_kbhit_status=0;
}

/******************************************************************************
/* usb_attach()
/*
/* Summary: Attach the D+/D- lines to the USB bus.  Enable the USB peripheral
/*
/*****************************************************************************/
void usb_attach(void) {
    UCON = 0;
    UIE = 0;                                // Mask all USB interrupts
    UCON_USBEN = 1;                     // Enable module & attach to bus
    usb_state = USB_STATE_ATTACHED;      // Defined in usbmmap.c & .h
}

/*****************************************************************************
/* usb_init_cs()
/*
/* Summary: Resets and initalizes USB peripheral.  Does not attach the peripheral
/*          to the USB bus.  See usb_attach() and usb_task() on how to
/*          attach to the USB bus.
/*
/*          You must call this before any other USB code.
/*
/*          NOTE: an alternative function, usb_init(), is provided that
/*                initializes the USB and then connects.
/*
/*****************************************************************************/
void usb_init_cs(void) {
      UCFG = __UCFG_VAL_;
      USTAT=0;
      usb_state = USB_STATE_DETACHED;
      usb_token_reset();              //clear the chapter9 stack
      __usb_kbhit_status=0;
}

/*****************************************************************************
/* usb_task()
/*
/* Summary: Keeps an eye on the connection sense pin to determine if we are
/*          attached to a USB cable or not.  If we are attached to a USB cable,
/*          initialize the USB peripheral if needed.  If we are disconnected
/*          from the USB cable, disable the USB peripheral.
/*
/*          NOTE: If you are not using a connection sense pin, will automatically
/*                enable the USB peripheral.
/*
/*          NOTE: this enables interrupts once the USB peripheral is ready
/*
/*****************************************************************************/
void usb_task(void) {
   if (usb_attached()) {
      if (UCON_USBEN==0) {
         debug_usb(debug_putc, "

USB TASK: ATTACH"Giño;
         usb_attach();
      }
   }
   else {
      if (UCON_USBEN==1)  {
         debug_usb(debug_putc, "

USB TASK: DE-ATTACH"Giño;
         usb_detach();
      }
   }

   if ((usb_state == USB_STATE_ATTACHED)&&(!UCON_SE0)) {
      UIR=0;
      UIE=0;
      enable_interrupts(INT_USB);
      enable_interrupts(GLOBAL);
      UIE=__USB_UIF_IDLE | __USB_UIF_RESET;  //enable IDLE and RESET USB interrupt
      usb_state=USB_STATE_POWERED;
      debug_usb(debug_putc, "

USB TASK: POWERED"Giño;
   }
}

/*****************************************************************************
/* usb_init()
/*
/* Summary: Resets and initalizes USB hardware.  You must call this first before
/*          using code.  Will attach the USB periperhal to the USB bus.
/*
/*          NOTE: If you are using a connection sense pin, this will wait in
/*                an infinite loop until the device is connected to a USB cable.
/*
/*          NOTE: If you are not using a connection sense pin, this will wait
/*                in an infinte loop until the SE0 condition clears, which usually
/*                doesn"t take long
/*
/*          NOTE: this enables interrupts.
/*
/*****************************************************************************/
void usb_init(void) {
   usb_init_cs();

   do {
      usb_task();
   } while (usb_state != USB_STATE_POWERED);
}

/****************************************************************************
/* usb_kbhit(endpoint)
/*
/* Input: endpoint - endpoint to check
/*
/* Output: TRUE if there is new data in RX buffer, FALSE if there is not.
/*
/* Summary: Similar to kbhit(), sees if there is new data in the RX USB buffers.
/*
/*****************************************************************************/
#define usb_kbhit(x) bit_test(__usb_kbhit_status,x)

/**************************************************************
/* usb_flush_packet_0()
/*
/* Input: len - size of packet to send
/*
/* Summary: Marks usb_ep0_tx_buffer[] as ready to transmit after
/*          processing the SETUP token interrupt.
/*
/***************************************************************/
void usb_flush_packet_0(int len) {
   __setup_0_tx_size=len;
}

/**************************************************************
/* usb_flush_in()
/*
/* Input: endpoint - which endpoint to mark for transfer
/*        len - length of data that is being tramsferred
/*        tgl - Data toggle synchronization for this packet
/*
/* Output: TRUE if success, FALSE if error (we don"t control the endpoint)
/*
/* Summary: Marks the endpoint ready for transmission.  You must
/*          have already loaded the endpoint buffer with data.
/*          (IN is PIC -> PC)
/***************************************************************/
int1 usb_flush_in(int8 endpoint, int8 len, USB_DTS_BIT tgl) {
   int8 i;

   debug_usb(debug_putc,"
PUT %X %U %U",endpoint, tgl, len);

   if (!bit_test(EP_BDxST_I(endpoint),7)) {

      EP_BDxCNT_I(endpoint)=len;

     debug_display_ram(len, EP_BDxADR_I(endpoint));

     #if USB_IGNORE_TX_DTS
      i=0x80;
     #else
      i=EP_BDxST_I(endpoint);
      if (tgl == USB_DTS_TOGGLE) {
         if (bit_test(i,6))
            tgl=USB_DTS_DATA0;  //was DATA1, goto DATA0
         else
            tgl=USB_DTS_DATA1;  //was DATA0, goto DATA1
      }

      if (tgl == USB_DTS_DATA1) {
         i=0xC8;  //DATA1, UOWN
      }
      else if (tgl == USB_DTS_DATA0) {
         i=0x88; //DATA0, UOWN
      }
     #endif

      debug_usb(debug_putc," %X",i,len);

      EP_BDxST_I(endpoint)=i;//save changes

      return(1);
   }
    else {
         debug_usb(debug_putc,"
PUT ERR"Giño;
    }
   return(0);
}

/*******************************************************************************
/* usb_put_packet(endpoint,*ptr,len,toggle)
/*
/* Input: endpoint - endpoint to send packet to
/*        ptr - points to data to send
/*        len - amount of data to send
/*        toggle - whether to send data with a DATA0 pid, a DATA1 pid, or toggle from the last DATAx pid.
/*
/* Output: TRUE if data was sent correctly, FALSE if it was not.  The only reason it will
/*         return FALSE is if because the TX buffer is still full from the last time you
/*         tried to send a packet.
/*
/* Summary: Sends one packet out the EP to the host.  Notice that there is a difference
/*          between a packet and a message.  If you wanted to send a 512 byte message you
/*          would accomplish this by sending 8 64-byte packets, followed by a 0 length packet.
/*          If the last (or only packet) being sent is less than the max packet size defined
/*          in your descriptor then you do not need to send a 0 length packet to identify
/*          an end of message.
/*
/*          usb_puts() (provided in usb.c) will send a multi-packet message correctly.
/*
/********************************************************************************/
int1 usb_put_packet(int8 endpoint, int8 * ptr, int8 len, USB_DTS_BIT tgl) { //done
   int8 i;
   int8 * buff_add;

   if (!bit_test(EP_BDxST_I(endpoint),7)) {

      buff_add=EP_BDxADR_I(endpoint);

      for (i=0;i<len;i++) {
         *buff_add=*ptr;
         buff_add++;
         ptr++;
      }

      return(usb_flush_in(endpoint, len, tgl));
    }
    else {
        debug_usb(debug_putc,"
PUT ERR"Giño;
    }
    return(0);
}

/// END User Functions


/// BEGIN Hardware layer functions required by USB.C

/**************************************************************
/* usb_flush_out()
/*
/* Input: endpoint - which endpoint to mark for transfer
/*        tgl - Data toggle synchronization to expect in the next packet
/*
/* Output: NONE
/*
/* Summary: Clears the previously received packet, and then marks this
/*          endpoint"s receive buffer as ready for more data.
/*          (OUT is PC -> PIC)
/***************************************************************/
void usb_flush_out(int8 endpoint, USB_DTS_BIT tgl) {
   int8 i;


     #if USB_IGNORE_TX_DTS
      if (tgl == USB_DTS_STALL) {
         debug_usb(debug_putc, "*");
         i=0x84;
         EP_BDxST_I(endpoint)=0x84;
         return;
      }
      else
         i=0x80;
     #else
      i=EP_BDxST_O(endpoint);
      if (tgl == USB_DTS_TOGGLE) {
         if (bit_test(i,6))
            tgl=USB_DTS_DATA0;  //was DATA1, goto DATA0
         else
            tgl=USB_DTS_DATA1;  //was DATA0, goto DATA1
      }
      if (tgl == USB_DTS_STALL) {
         i=0x84;
         EP_BDxST_I(endpoint)=0x84; //stall both in and out endpoints
      }
      else if (tgl == USB_DTS_IGNORE) {
         i=0x80;
      }
      else if (tgl == USB_DTS_DATA1) {
         i=0xC8;  //DATA1, UOWN
      }
      else if (tgl == USB_DTS_DATA0) {
         i=0x88; //DATA0, UOWN
      }
     #endif

   bit_clear(__usb_kbhit_status,endpoint);
   EP_BDxCNT_O(endpoint)=usb_ep_rx_size[endpoint];
   EP_BDxST_O(endpoint)=i;
}

/*******************************************************************************
/* usb_get_packet(endpoint, *ptr, max)
/*
/* Input: endpoint - endpoint to get data from
/*        ptr - where to save data to local PIC RAM
/*        max - max amount of data to receive from buffer
/*
/* Output: the amount of data taken from the buffer.
/*
/*         NOTE - IF THERE IS NO PACKET TO GET YOU WILL GET INVALID RESULTS!
/*                VERIFY WITH USB_KBHIT() BEFORE YOU CALL USB_GET_PACKET()!
/*
/* Summary: Gets a packet of data from the USB buffer and puts into local PIC RAM.
/*          Until you call usb_get_packet() the data will sit in the endpoint
/*          buffer and the PC will get NAKs when it tries to write more data
/*          to the endpoint.
/*
/********************************************************************************/
int8 usb_get_packet(int8 endpoint, int8 * ptr, int8 max) {
   int8 * al;
   int8 i;

   al=EP_BDxADR_O(endpoint);
   i=EP_BDxCNT_O(endpoint);

   if (i<max) {max=i;}

   i=0;

   while (i<max) {
       *ptr=*al;
       ptr++;
       al++;
       i++;
   }

   usb_flush_out(endpoint, USB_DTS_TOGGLE);

   return(max);
}

/*******************************************************************************
/* usb_stall_ep(endpoint,direction)
/*
/* Input: endpoint - endpoint to stall.
/*                   top most bit indicates direction (set is IN, clear is OUT)
/*
/* Summary: Stalls specified endpoint.  If endpoint is stalled it will NAK any tokens
/*          destined to that endpoint.
/*
/*
/* NOTE: WE ASSUME ENDPOINT IS VALID.  USB.C SHOULD CHECK THIS
/*
/********************************************************************************/
void usb_stall_ep(int8 endpoint) {  //done
   int1 direction;
   direction=bit_test(endpoint,7);
   endpoint&=0x7F;
   if (direction) {
      EP_BDxST_I(endpoint)=0x84;
   }
   else {
      EP_BDxST_O(endpoint)=0x84;
   }
}

/*******************************************************************************
/* usb_unstall_ep(endpoint, direction)
/*
/* Input: endpoint - endpoint to un-stall.
/*                   top most bit indicates direction (set is IN, clear is OUT)
/*
/* Summary: Un-stalls endpoint.
/*
/* NOTE: WE ASSUME ENDPOINT IS VALID.  USB.C SHOULD CHECK THIS
/********************************************************************************/
void usb_unstall_ep(int8 endpoint) {   //done
   int1 direction;
   direction=bit_test(endpoint,7);
   endpoint&=0x7F;
   if (direction) {
      #if USB_IGNORE_RX_DTS
      EP_BDxST_I(endpoint)=0x80;
      #else
      EP_BDxST_I(endpoint)=0x88;
      #endif
   }
   else {
      EP_BDxST_O(endpoint)=0x00;
   }
}

/*******************************************************************************
/* usb_endpoint_stalled(endpoint)
/*
/* Input: endpoint - endpoint to check
/*                   top most bit indicates direction (set is IN, clear is OUT)
/*
/* Output: returns a TRUE if endpoint is stalled, FALSE if it is not.
/*
/* Summary: Looks to see if an endpoint is stalled, or not.  Does not look to
/*          see if endpoint has been issued a STALL, just whether or not it is
/*          configured to STALL on the next packet.  See Set_Feature and Clear_Feature
/*          Chapter 9 requests.
/*
/* NOTE: WE ASSUME ENDPOINT IS VALID.  USB.C SHOULD CHECK THIS
/********************************************************************************/
int1 usb_endpoint_stalled(int8 endpoint) {   //done
   int1 direction;
   int8 st;
   direction=bit_test(endpoint,7);
   endpoint&=0x7F;
   if (direction) {
      st=EP_BDxST_I(endpoint);
   }
   else {
      st=EP_BDxST_O(endpoint);
   }
   return(bit_test(st,7) && bit_test(st,2));
}


/*******************************************************************************
/* usb_set_address(address)
/*
/* Input: address - address the host specified that we use
/*
/* Summary: Configures the USB Peripheral for the specified device address.  The host
/*          will now talk to use with the following address.
/*
/********************************************************************************/
void usb_set_address(int8 address) {   //done
   UADDR=address;
   if (address) {
      usb_state=USB_STATE_ADDRESS;
   }
   else {
      usb_state=USB_STATE_POWERED;
   }
}


/*******************************************************************************
/* usb_set_configured(config)
/*
/* Input: config - Configuration to use.  0 to uncofigure device.
/*
/* Summary: Configures or unconfigures device.  If configuring device it will
/*          enable all the endpoints the user specified for this configuration.
/*          If un-configuring device it will disable all endpoints.
/*
/*          NOTE: CCS only provides code to handle 1 configuration.
/*
/********************************************************************************/
void usb_set_configured(int config) {  
   int8 en;
   int16 addy;
   int8 new_uep;
      if (config==0) {
         //if config=0 then set addressed state
         usb_state=USB_STATE_ADDRESS;
         usb_disable_endpoints();
      }
      else {
         usb_state=USB_STATE_CONFIGURED; //else set configed state
         addy=(int16)0x500+(2*USB_MAX_EP0_PACKET_LENGTH);
         for (en=1;en<16;en++) {
            new_uep=0;
            if (usb_ep_rx_type[en]!=USB_ENABLE_DISABLED) {
               new_uep=0x04;
               EP_BDxCNT_O(en)=usb_ep_rx_size[en];
               EP_BDxADR_O(en)=addy;
               addy+=usb_ep_rx_size[en];
               #if USB_IGNORE_RX_DTS
                  EP_BDxST_O(en)=0x80;
               #else
                  EP_BDxST_O(en)=0x88;
               #endif
            }
            if (usb_ep_tx_type[en]!=USB_ENABLE_DISABLED) {
               new_uep|=0x02;
               EP_BDxADR_I(en)=addy;
               addy+=usb_ep_tx_size[en];
               EP_BDxST_I(en)=0x40;
            }
            if (new_uep==0x06) {new_uep=0x0E;}
            if (usb_ep_tx_type[en]!=USB_ENABLE_ISOCHRONOUS) {
               new_uep|=0x10;
            }
            UEP(en)=new_uep;
         }
      }
}

/// END Hardware layer functions required by USB.C


/// BEGIN USB Interrupt Service Routine

/*******************************************************************************
/* usb_handle_interrupt()
/*
/* Summary: Checks the interrupt, and acts upon event.  Processing finished
/*          tokens is the majority of this code, and is handled by usb.c
/*
/* NOTE: If you wish to change to a polling method (and not an interrupt method),
/*       then you must call this function rapidly.  If there is more than 10ms
/*       latency the PC may think the USB device is stalled and disable it.
/*       To switch to a polling method, remove the #int_usb line above this fuction.
/*       Also, goto usb_init() and remove the code that enables the USB interrupt.
/********************************************************************************/
#int_usb
void usb_isr() {
   if (usb_state==USB_STATE_DETACHED) return;   //should never happen, though
   if (UIR) {
      debug_usb(debug_putc,"

[%X] ",UIR);
      if (UIR_ACTV && UIE_ACTV) {usb_isr_activity();}  //activity detected.  (only enable after sleep)

      if (UCON_SUSPND) return;

      if (UIR_UERR && UIE_UERR) {usb_isr_uerr();}          //error has been detected

      if (UIR_URST && UIE_URST) {usb_isr_rst();}        //usb reset has been detected

      if (UIR_IDLE && UIE_IDLE) {usb_isr_uidle();}        //idle time, we can go to sleep
      if (UIR_SOF && UIE_SOF) {usb_isr_sof();}
      if (UIR_STALL && UIE_STALL) {usb_isr_stall();}        //a stall handshake was sent

      if (UIR_TRN && UIE_TRN) {
         usb_isr_tok_dne();
         UIR_TRN=0;    // clear the token done interrupt., 0x190.3
      }    //a token has been detected (majority of isrs)
   }
}

//SOF interrupt not handled.  user must add this depending on application
void usb_isr_sof(void) {
   debug_usb(debug_putc,"
SOF"Giño;
   UIR_SOF=0;
}

/*******************************************************************************
/* usb_disable_endpoints()
/*
/* Summary: Disables endpoints 1 thru 15
/*
/********************************************************************************/
void usb_disable_endpoints(void) {
   int8 i;
   for (i=1;i<16;i++) {
      UEP(i)=ENDPT_DISABLED;
   }
   __usb_kbhit_status=0;
}

/*******************************************************************************
/* usb_isr_rst()
/*
/* Summary: The host (computer) sent us a RESET command.  Reset USB device
/*          and token handler code to initial state.
/*
/********************************************************************************/
void usb_isr_rst() {
   debug_usb(debug_putc,"R"Giño;

   UEIR=0;
   UIR=0;
   UEIE=0x9F;
   UIE=STANDARD_INTS & ~__USB_UIF_ACTIVE;

   UADDR=0;

   usb_token_reset();

   usb_disable_endpoints();

   UEP(0)=ENDPT_CONTROL | 0x10;

   while (UIR_TRN) {
      UIR_TRN=0;    //do this to clear out the ustat fifo
   }

   UCON_PKTDIS=0; //SIE token and packet processing enabled

   usb_init_ep0_setup();

   usb_state=USB_STATE_DEFAULT; //put usb mcu into default state
}

/*****************************************************************************
/* usb_init_ep0_setup()
/*
/* Summary: Configure EP0 to receive setup packets
/*
/*****************************************************************************/
void usb_init_ep0_setup(void) {
    EP_BDxCNT_O(0) = USB_MAX_EP0_PACKET_LENGTH;
    EP_BDxADR_O(0) = 0x500;
   #if USB_IGNORE_RX_DTS
    EP_BDxST_O(0) = 0x80; //give control to SIE, data toggle synch off
   #else
    EP_BDxST_O(0) = 0x88; //give control to SIE, DATA0, data toggle synch on
   #endif

    EP_BDxST_I(0) = 0;
    EP_BDxADR_I(0) = 0x500 + (int16)USB_MAX_EP0_PACKET_LENGTH;
}

/*******************************************************************************
/* usb_isr_uerr()
/*
/* Summary: The USB peripheral had an error.  If user specified, error counter
/*          will incerement.  If having problems check the status of these 8 bytes.
/*
/* NOTE: This code is not enabled by default.
/********************************************************************************/
void usb_isr_uerr() {
#if USB_USE_ERROR_COUNTER
   int ints;
#endif

   debug_usb(debug_putc,"E %X ",UEIR);

#if USB_USE_ERROR_COUNTER

   ints=UEIR & UEIE; //mask off the flags with the ones that are enabled

   if ( bit_test(ints,0) ) { //increment pid_error counter
      debug_usb(debug_putc,"PID "Giño;
      ERROR_COUNTER[0]++;
   }

   if ( bit_test(ints,1) ) {  //increment crc5 error counter
      debug_usbdebug_putc,"CRC5 "Giño;
      ERROR_COUNTER[1]++;
   }

   if ( bit_test(ints,2) ) {  //increment crc16 error counter
      debug_usb(debug_putc,"CRC16 "Giño;
      ERROR_COUNTER[2]++;
   }

   if ( bit_test(ints,3) ) {  //increment dfn8 error counter
      debug_usb(debug_putc,"DFN8 "Giño;
      ERROR_COUNTER[3]++;
   }

   if ( bit_test(ints,4) ) {  //increment bto error counter
      debug_usb(debug_putc,"BTO "Giño;
      ERROR_COUNTER[4]++;
   }

   if ( bit_test(ints,7) ) { //increment bts error counter
      debug_usb(debug_putc,"BTS "Giño;
      ERROR_COUNTER[5]++;
   }
#endif

   UEIR=0;
   UIR_UERR=0;
}

/*******************************************************************************
/* usb_isr_uidle()
/*
/* Summary: USB peripheral detected IDLE.  Put the USB peripheral to sleep.
/*
/********************************************************************************/
void usb_isr_uidle() {
   debug_usb(debug_putc,"I"Giño;

   UIE_ACTV=1;   //enable activity interrupt flag. (we are now suspended until we get an activity interrupt. nice)
   UIR_IDLE=0; //clear idle interrupt flag
   UCON_SUSPND=1; //set suspend. we are now suspended
}


/*******************************************************************************
/* usb_isr_activity()
/*
/* Summary: USB peripheral detected activity on the USB device.  Wake-up the USB
/*          peripheral.
/*
/********************************************************************************/
void usb_isr_activity() {
   debug_usb(debug_putc,"A"Giño;

   UCON_SUSPND=0; //turn off low power suspending
   UIE_ACTV=0; //clear activity interupt enabling
   UIR_ACTV=0;
}

/*******************************************************************************
/* usb_isr_stall()
/*
/* Summary: Stall handshake detected.
/*
/********************************************************************************/
void usb_isr_stall(void) {
   debug_usb(debug_putc,"S"Giño;

   if (bit_test(UEP(0),0)) {
      usb_init_ep0_setup();
      bit_clear(UEP(0),0);
   }
   UIR_STALL=0;
}


/*******************************************************************************
/* usb_isr_tok_dne()
/*
/* Summary: A Token (IN/OUT/SETUP) has been received by the USB peripheral.
/*          If a setup token on EP0 was received, run the chapter 9 code and
/*          handle the request.
/*          If an IN token on EP0 was received, continue transmitting any
/*          unfinished requests that may take more than one packet to transmit
/*          (if necessary).
/*          If an OUT token on any other EP was received, mark that EP as ready
/*          for a usb_get_packet().
/*          Does not handle any IN or OUT tokens on EP0.
/*
/********************************************************************************/
void usb_isr_tok_dne() {
   int8 en;

   en=USTAT>>3;

         debug_usb(debug_putc,"T "Giño;
         debug_usb(debug_putc,"%X ", USTAT);

      if (USTAT==USTAT_OUT_SETUP_E0) {   //new out or setup token in the buffer
         debug_usb(debug_putc,"%X ", EP_BDxST_O(0));
         if ((EP_BDxST_O(0) & 0x3C)==USB_PIC_PID_SETUP) {
            __setup_0_tx_size=0xFF;
            debug_usb(debug_putc,"(%U) ", EP_BDxCNT_O(0));
            EP_BDxST_I(0)=0;   // return the in buffer to us (dequeue any pending requests)

            debug_display_ram(EP_BDxCNT_O(0), usb_ep0_rx_buffer);
            usb_isr_tok_setup_dne();

            //clear the OUT buffer, make it ready for more packets - or stall
            if (__setup_0_tx_size==0)
               usb_flush_out(0,USB_DTS_DATA1);
            else if (__setup_0_tx_size==0xFF)
               usb_flush_out(0,USB_DTS_STALL);
            else
               usb_flush_out(0,USB_DTS_IGNORE);

            //if a packet is going out, mark the IN buffer as ready
            if (__setup_0_tx_size!=0xFF) {
               debug_usb(debug_putc, "
PUT "Giño;
               debug_display_ram(__setup_0_tx_size, usb_ep0_tx_buffer);

               EP_BDxCNT_I(0)=__setup_0_tx_size;
               EP_BDxST_I(0)=0xC8;
            }

            UCON_PKTDIS=0;       // UCON,PKT_DIS ; Assuming there is nothing to dequeue, clear the packet disable bit
         }
         else if ((EP_BDxST_O(0) & 0x3C)==USB_PIC_PID_OUT) {
            usb_isr_tok_out_dne(0);
         }
      }

      else if (USTAT==USTAT_IN_E0) {   //pic -> host transfer completed
         __setup_0_tx_size=0xFF;
         usb_isr_tok_in_dne(0);
         if (__setup_0_tx_size!=0xFF) {
            debug_usb(debug_putc, "
PUT "Giño;
            debug_display_ram(__setup_0_tx_size, usb_ep0_tx_buffer);
            EP_BDxCNT_I(0)=__setup_0_tx_size;
            en=EP_BDxST_I(0);
            if (bit_test(en,6)) {EP_BDxST_I(0)=0x88;}
            else {EP_BDxST_I(0)=0xC8;}
         }
         else {
            usb_init_ep0_setup();
         }
      }

      else {
         if (!bit_test(USTAT,2)) {
            bit_set(__usb_kbhit_status,en);
         }
      }
}

/// END USB Interrupt Service Routine

#ENDIF

Con respecto a la funcion, tu lo que quieres(o eso entendido yo jeje) es comunicacion via usb PC con el pic...para ello deberas programar en tu programa en c(software a nivel de PC) una instruccion que al ser utilizada mande por el puerto usb una orden que el pic entienda a que la funcion a realizar es la multiplicacion.....vamos en resumen lo que tienes es programar y ordenar un medio externo(el pic en cuestion).......suerte!!!Giño
· Nos vemos en los bares!!!!!
· Mi Blog: Aqueronte

Desconectado yolanda_p

  • PIC10
  • *
  • Mensajes: 4
RE: Ayuda para una novata
« Respuesta #6 en: 19 de Agosto de 2005, 06:15:00 »
Gracias de nuevo piriots.

El include si lo tengo, lo que me falta es esa o esas librerias para poder comunicar con el Pc por Usb y el sumum seria un ejemplo para comenzar a hacer mis primeros pinitos en este mundillo

Saludos

Yolanda




Desconectado J1M

  • Moderadores
  • PIC24H
  • *****
  • Mensajes: 1960
RE: Ayuda para una novata
« Respuesta #7 en: 19 de Agosto de 2005, 06:19:00 »
Hola Yolanda

Tu problema se me ocurre hacerlo de esta forma:

- El programa del PC (si quieres ahorrarte problemas de drivers y demas, trabaja sobre HID ó CDC, puedes encontrar referencias a esto en la página de microchip http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2124&param=en022613&Pagetitle=Full%20Speed%20USB%20Solutions )

- Este programa tendrá por ejemplo dos casillas en blanco donde poner los dos valores a multiplicar, el boton "multiplicar" y una tercera donde se muestre el resultado.

- En el momento de darle al boton multiplicar, se envian los datos por USB.

- En el PIC abilitas la interrupción del puerto USB, de tal forma que cuando detecte alguna señal que va a entrar por las patillas correspondientes, entres en la rutina de tratamiendo de la interrupción, que en tu caso sería la q multiplicaría los dos números, devolvería el resultado.

saludos!


pd: vszener  acabo de leer tu post... no sabia q la version 3.227 ya traia el driver!!!  .. asiq edito lo dicho Giño

Desconectado yolanda_p

  • PIC10
  • *
  • Mensajes: 4
RE: Ayuda para una novata
« Respuesta #8 en: 19 de Agosto de 2005, 07:03:00 »
Gracias a todos

Voy a leer esta info de Microchip que me dice J1M, pero la verdad es que estoy hecha un lio

Parece que el compilador mas apropiado o que mas info dispone para el 18f2550 es el c18 de Microchip, aunque me parece mas lioso de manejar que el PCW

Respecto a las interrupciones, se lo que son pero aún no he aprendido lo suficiente para activarlas y manejarlas

Intentaré centrarme un poco y luego preguntar concretamente porque ahora mismo como digo estoy hecha un mar de dudas

Saludos

Desconectado vszener

  • Moderador Local
  • PIC24H
  • *****
  • Mensajes: 2395
RE: Ayuda para una novata
« Respuesta #9 en: 19 de Agosto de 2005, 07:25:00 »
Jeje.....la verdad que el c18 es el apropiado peor vamos el CCS la ventaja que tiene es que posee mucha informacion respecto a sus funciones y librerias en su "help"....de todas formas si empiezas en esto de los PIC"s(Peripheral Interface Controller) jeje decirte que empieces por lo basico, dices que sabes programar en c...eso es un paso muy bueno pero no es suficiente, lo que te va servir son las sentencias de bucles,declarar variables etc es igual que el c para software....pero aparte tendra que aprender el c para pic(sus funciones declaradas ya anteriormente), por eso te aconsejo que empieces por algo basico...a encender led"s, manejar 7 segmentos, lcd, etc.....asi manejaras los perifericos de los respectivos pic"s poseen..decirte que lenguaje c para pic"s es igual para todos, lo unico que cambia es segun los perifericos que el pic posea(comparadores, interrupciones externas, etc...) asi que aqui te dejo un link sobre progamitas en c bastante basicos(empiezan desde cero) pero pueden ayudarte para aprender a como manejar los puertos y demas cositas:

http://miarroba.com/foros/ver.php?foroid=46840&temaid=4061462

Añadir que este post lo inicie yo jeje asi que los ejemplitos que estan presentes son los que yo he puesto e intentare ir poniendo mas jeje(ya se que es auto-publicidaddddd jej pero puede ayudarte a programar)
Y aqui te dejo otro post que en la seccion de microcontrladores hablan del modulo usb del 18Fx550 kizas te sea de utilidad:

http://miarroba.com/foros/ver.php?foroid=6510&temaid=3675112

Suerte!!!!!Giño
· Nos vemos en los bares!!!!!
· Mi Blog: Aqueronte


 

anything