Autor Tema: ayuda con probador de cables rj 45  (Leído 2205 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado T.E.I

  • PIC10
  • *
  • Mensajes: 18
ayuda con probador de cables rj 45
« en: 07 de Noviembre de 2011, 03:23:58 »


 :-/ Hola
Este es mi primer tema
La verdad no tengo mucha experiencia  con los pic  acudo a  ustedes por la experiencia que tienen y la colaboración que me puedan prestar.
Arme un probador de cables rj45
Cuando le doy inicio me funciona muy bien y tarda 5 segundos  en analizar el cable, pero después testear otro punto u otro cable seme demora mucho hasta 5 minutos procesando  y no se como sacarlo del bucle y no quiero estar apagando y prendiendo cada que quiera revisar los cables y más cuando tengo unos 20  o más cables para revisar

De antemano muchas gracias por su colaboración mi coreo es    :::: t.e.i@hotmail.com  ::::
 
aqui les dejo el programa o si algien tiene otro mejor les agradesco
 
 //PROBADOR DE CABLES RJ 45
#include <16F877a.H>
#use Delay(Clock=4000000)
#include <lcd.c>
#fuses XT,NOWDT,NOPROTECT,PUT,NOBROWNOUT,NOLVP
#priority rb,timer1
#BYTE PORTA=5
#BYTE PORTB=6
#BYTE PORTC=7
#BYTE PORTD=8

int veces=0,inte=0,freq=0,freq1=0,freq2=0,freq3=0,freq4=0;
long int  puerto=0,puerto1=0,puerto2=0,puerto3=0,puerto4=0,suma=0;
#INT_RB
void interrupcion(){
   disable_interrupts(int_RB);
   inte++;
   if (inte==1)
   {if (input(pin_b7)==0)
     {puerto1=4000;}
    if (input(pin_b6)==0)
     {puerto1=3000;}
    if (input(pin_b5)==0)
     {puerto1=2000;}
    if (input(pin_b4)==0)
     {puerto1=1000;}}

    if (inte==2)
   {if (input(pin_b7)==0)
     {puerto2=400;}
    if (input(pin_b6)==0)
     {puerto2=300;}
    if (input(pin_b5)==0)
     {puerto2=200;}
    if (input(pin_b4)==0)
     {puerto2=100;}}

   if (inte==3)
   {if (input(pin_b7)==0)
     {puerto3=40;}
    if (input(pin_b6)==0)
     {puerto3=30;}
    if (input(pin_b5)==0)
     {puerto3=20;}
    if (input(pin_b4)==0)
     {puerto3=10;}}

    if (inte==4)
   {if (input(pin_b7)==0)
     {puerto4=4;}
    if (input(pin_b6)==0)
     {puerto4=3;}
    if (input(pin_b5)==0)
     {puerto4=2;}
    if (input(pin_b4)==0)
     {puerto4=1;}}
     }

#INT_TIMER1
void interrupcion2(){
inte++;}

void main() {

    inicio:
    set_tris_b(0xf0);
    set_tris_c(0);
    set_tris_d(0);
    port_b_pullups(true);
    portb=0;
    lcd_init();
    printf(lcd_putc,"\f   THE HUNTER\nT-E-I 3114662245");
    delay_ms(2000);
 
    printf(lcd_putc,"\f  PARA  INICIAR\nPULSE BOTON # 2");
    verifique:
    if (input(PIN_A0)==0)
    goto inicio2;
    goto verifique;

    inicio2:
    setup_ccp1(CCP_PWM);
    set_pwm1_duty(128);
    setup_timer_2(T2_DIV_BY_16,255,1);

    printf(lcd_putc,"\f   PROCESANDO");
    delay_ms(500);


    uno:
    portb=1;
    set_timer1(3036);
    setup_timer_1(T1_INTERNAL | T1_DIV_BY_8);
    enable_interrupts(INT_TIMER1);
    enable_interrupts(INT_RB);
    delay_ms(100);
    enable_interrupts(GLOBAL);
    nada1:
    if (inte==1)
    {goto dos;}
    goto nada1;

    dos:
    portb=2;
    set_timer1(3036);
    setup_timer_1(T1_INTERNAL | T1_DIV_BY_8);
    enable_interrupts(INT_TIMER1);
    enable_interrupts(INT_RB);
    enable_interrupts(GLOBAL);
    nada2:
    if (inte==2)
    {goto tres;}
    goto nada2;

    tres:
    portb=4;
    set_timer1(3036);
    setup_timer_1(T1_INTERNAL | T1_DIV_BY_8);
    enable_interrupts(INT_TIMER1);
    enable_interrupts(INT_RB);
    enable_interrupts(GLOBAL);
    nada3:
    if (inte==3)
    {goto cuatro;}
    goto nada3;

    cuatro:
    portb=8;
    set_timer1(3036);
    setup_timer_1(T1_INTERNAL | T1_DIV_BY_8);
    enable_interrupts(INT_TIMER1);
    enable_interrupts(INT_RB);
    enable_interrupts(GLOBAL);
    nada4:
    if (inte==4)
    {goto fin;}
    goto nada4;

    fin:
    disable_interrupts(GLOBAL);
    suma=puerto1+puerto2+puerto3+puerto4;
    if (suma==4321)
    {printf(lcd_putc,"\f  RED PERFECTA\n C");
    goto nada;}
    if (puerto4==0)
    {printf(lcd_putc,"\f RED DEFECTUOSA\nLINEA 7 O 8 MALA");
    goto nada;}
    printf(lcd_putc,"\f RED PERFECTA\nREVISE CATEGORIA");
    nada:
    if (input(PIN_A0)==0)
    goto inicio;
    goto nada;}

Desconectado Algec

  • Colaborador
  • PIC24F
  • *****
  • Mensajes: 974
Re: ayuda con probador de cables rj 45
« Respuesta #1 en: 07 de Noviembre de 2011, 06:17:12 »
Tengo uno hecho y funcionando que va bien y que tiene un terminador: si quieres el proyecto entero te lo paso aqui abajo

Desconectado T.E.I

  • PIC10
  • *
  • Mensajes: 18
Re: ayuda con probador de cables rj 45
« Respuesta #2 en: 07 de Noviembre de 2011, 15:08:13 »
  :-/ HOLA :-/
 ALGEC MUCHAS GRACIAS DIOS LO BENDIGA ESTA MUCHO MEJOR QUE EL MIO AJJAJAJAJAJAJJA
« Última modificación: 07 de Noviembre de 2011, 15:10:46 por T.E.I »