Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
t-edson authored Aug 27, 2017
1 parent b245825 commit 714fb6b
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Comparacion PicPas-MikroC-CCS/Result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MEMORY USE COMPARISON:

MikroC 7.0.0
============
RAM: 18 bytes FLASH: 126 words

CCS 4.104
=========
RAM: 7 bytes FLASH: 135 words

PicPas 0.7.5
============
RAM: 2 bytes FLASH: 64 words

Pic Micro Pacal 2.1.4
=====================
RAM: 4 bytes FLASH: 104 words

JAL 0.9.0
=========
RAM: 9 bytes FLASH: 116 words
66 changes: 66 additions & 0 deletions Comparacion PicPas-MikroC-CCS/program_CCS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
////////////////////////////////////////////////////////////////////////////////////
// VsZeNeR"04
// 7/Agosto/05
//
// Programa: Coche Fantastico
// Version: 0.0
//
// Dispositivo: PIC 16F648A Compilador: CCS vs3.227
// Entorno IDE: MPLAB IDE v7.20 Simulador: Proteus 6.7sp3
//
// Notas: Barrido de led"s simulando la iluminacion del coche fantastico por el
// puerto A
//
// RA0 -> 1� Led
// RA1 -> 2� Led
// RA2 -> 3� Led
// RA3 -> 4� Led
// Fuente: http://www.todopic.com.ar/foros/index.php?topic=4530.msg38857#msg38857
//////////////////////////////////////////////////////////////////////////////////

#include <16f648a.h> //pic a utilizar
#fuses XT,NOWDT,NOPROTECT,PUT //ordenes para el programador
#use delay (clock=4000000) //Fosc=4Mhz
#use standard_io(A) //puerto A como salida

///DECLARACIONES DE FUNCIONES
void derecha(void); //ilumina led"s derecha a izquierda
void izquierda(void); //ilumina led"s izquierda a derecha

///PROGRAMA
void main(void)
{
set_tris_a(0xF0); //porta como salida menos RA4(desactivado)
disable_interrupts(GLOBAL); //todas las interrupciones desactivadas

do{ //bucle...
derecha();
izquierda();
}while(TRUE); //...infinito
}

void derecha(void)
{
output_high(PIN_A0);
delay_ms(300);
output_low(PIN_A0);
output_high(PIN_A1);
delay_ms(300);
output_low(PIN_A1);
output_high(PIN_A2);
delay_ms(300);
output_low(PIN_A2);
output_high(PIN_A3);
delay_ms(300);
}

void izquierda(void)
{
output_low(PIN_A3);
output_high(PIN_A2);
delay_ms(300);
output_low(PIN_A2);
output_high(PIN_A1);
delay_ms(300);
output_low(PIN_A1);
}
49 changes: 49 additions & 0 deletions Comparacion PicPas-MikroC-CCS/program_JAL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--
-- Programa que genera el efecto de luces del "Auto fant�stico"
-- Compilado en JAL 0.9.0
-- Adaptado de:
-- Fuente: http://www.todopic.com.ar/foros/index.php?topic=4530.msg38857#msg38857
--

include 16f84a -- target PICmicro
pragma target clock 8_000_000 -- oscillator frequency
pragma target OSC HS -- HS crystal or resonator
pragma target WDT disabled -- no watchdog
include delay

procedure derecha() is
begin
pin_A0 = 1;
delay_1ms(300);
pin_A0 = 0;
pin_A1 = 1;
delay_1ms(300);
pin_A1 = 0;
pin_A2 = 1;
delay_1ms(300);
pin_A2 = 0;
pin_A3 = 1;
delay_1ms(300);
end procedure

procedure izquierda() is
begin
pin_A3 = 0;
pin_A2 = 1;
delay_1ms(300);
pin_A2 = 0;
pin_A1 = 1;
delay_1ms(300);
pin_A1 = 0;
end procedure

pin_A0_direction = output
pin_A1_direction = output
pin_A2_direction = output
pin_A3_direction = output
--
forever loop
derecha();
izquierda();
end loop
--
61 changes: 61 additions & 0 deletions Comparacion PicPas-MikroC-CCS/program_MikroC.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
////////////////////////////////////////////////////////////////////////////////////
// VsZeNeR"04
// 7/Agosto/05
//
// Programa: Coche Fantastico
// Version: 0.0
//
// Dispositivo: PIC 16F648A Compilador: CCS vs3.227
// Entorno IDE: MPLAB IDE v7.20 Simulador: Proteus 6.7sp3
//
// Notas: Barrido de led"s simulando la iluminacion del coche fantastico por el
// puerto A
//
// RA0 -> 1� Led
// RA1 -> 2� Led
// RA2 -> 3� Led
// RA3 -> 4� Led
// Fuente: http://www.todopic.com.ar/foros/index.php?topic=4530.msg38857#msg38857
//////////////////////////////////////////////////////////////////////////////////

///DECLARACIONES DE FUNCIONES
void derecha(void); //ilumina led"s derecha a izquierda
void izquierda(void); //ilumina led"s izquierda a derecha

///PROGRAMA
void main(void)
{
TRISA = 0xF0; //porta como salida menos RA4(desactivado)
GIE_bit = 0; //todas las interrupciones desactivadas

while(1) { //bucle...
derecha();
izquierda();
}; //...infinito
}

void derecha(void)
{
PORTA.F0 = 1;
delay_ms(300);
PORTA.F0 = 0;
PORTA.F1 = 1;
delay_ms(300);
PORTA.F1 = 0;
PORTA.F2 = 1;
delay_ms(300);
PORTA.F2 = 0;
PORTA.F3 = 1;
delay_ms(300);
}

void izquierda(void)
{
PORTA.F3 = 0;
PORTA.F2 = 1;
delay_ms(300);
PORTA.F2 = 0;
PORTA.F1 = 1;
delay_ms(300);
PORTA.F1 = 0;
}
56 changes: 56 additions & 0 deletions Comparacion PicPas-MikroC-CCS/program_PicMicroPascal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
////////////////////////////////////////////////////////////////////////////////////
// VsZeNeR"04
// 7/Agosto/05
//
// Programa: Coche Fantastico
// Version: 0.0
//
// Dispositivo: PIC 16F648A Compilador: CCS vs3.227
// Entorno IDE: MPLAB IDE v7.20 Simulador: Proteus 6.7sp3
//
// Notas: Barrido de led"s simulando la iluminacion del coche fantastico por el
// puerto A
//
// RA0 -> 1� Led
// RA1 -> 2� Led
// RA2 -> 3� Led
// RA3 -> 4� Led
// Fuente: http://www.todopic.com.ar/foros/index.php?topic=4530.msg38857#msg38857
//////////////////////////////////////////////////////////////////////////////////
program Test_Lcd;
{$PROCESSOR PIC16F84}
procedure derecha;
begin
PORTA.0 := 1;
delay_ms(300);
PORTA.0 := 0;
PORTA.1 := 1;
delay_ms(300);
PORTA.1 := 0;
PORTA.2 := 1;
delay_ms(300);
PORTA.2 := 0;
PORTA.3 := 1;
delay_ms(300);
end;

procedure izquierda;
begin
PORTA.3 := 0;
PORTA.2 := 1;
delay_ms(300);
PORTA.2 := 0;
PORTA.1 := 1;
delay_ms(300);
PORTA.1 := 0;
end;

begin
TRISA := $F0; //porta como salida menos RA4(desactivado)
INTCON.GIE := 0; //todas las interrupciones desactivadas

while true do begin //bucle...
derecha;
izquierda;
end; //...infinito
end.
57 changes: 57 additions & 0 deletions Comparacion PicPas-MikroC-CCS/program_PicPas.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
////////////////////////////////////////////////////////////////////////////////////
// VsZeNeR"04
// 7/Agosto/05
//
// Programa: Coche Fantastico
// Version: 0.0
//
// Dispositivo: PIC 16F648A Compilador: CCS vs3.227
// Entorno IDE: MPLAB IDE v7.20 Simulador: Proteus 6.7sp3
//
// Notas: Barrido de led"s simulando la iluminacion del coche fantastico por el
// puerto A
//
// RA0 -> 1� Led
// RA1 -> 2� Led
// RA2 -> 3� Led
// RA3 -> 4� Led
// Fuente: http://www.todopic.com.ar/foros/index.php?topic=4530.msg38857#msg38857
//////////////////////////////////////////////////////////////////////////////////
program Coche;
{$PROCESSOR PIC16F84}
uses PIC16F84A;
procedure derecha;
begin
PORTA.0 := 1;
delay_ms(300);
PORTA.0 := 0;
PORTA.1 := 1;
delay_ms(300);
PORTA.1 := 0;
PORTA.2 := 1;
delay_ms(300);
PORTA.2 := 0;
PORTA.3 := 1;
delay_ms(300);
end;

procedure izquierda;
begin
PORTA.3 := 0;
PORTA.2 := 1;
delay_ms(300);
PORTA.2 := 0;
PORTA.1 := 1;
delay_ms(300);
PORTA.1 := 0;
end;

begin
TRISA := $F0; //porta como salida menos RA4(desactivado)
INTCON_GIE := 0; //todas las interrupciones desactivadas

while true do //bucle...
derecha;
izquierda;
end; //...infinito
end.

0 comments on commit 714fb6b

Please sign in to comment.