Placa de pruebas con Picaxe-08M (2)

El microcontrolador Picaxe utilizado es el 08M. Aquí teneís el esquema del picaxe:

 

 

En los pines de la placa tenemos disponibles todos los pines del microcontrolador a excepción del pin 2 (Serial In). El jumper que hay encima del Picaxe sirve para utilizar el Serial In del pin 2 o cualquier entrada para realizar comunicaciones serie con un ordenador u otro Picaxe. Si está a la izquierda el jumper se utiliza para programar el Picaxe, pero si ponemos el jumper a la derecha ponemos el pin del Picaxe del Serial In a masa y en el pin libre podemos conectar cualquier entrada del Picaxe mediante un cable.

El jumper de la derecha sirve para utilizar Serial Out si esta arriba o la Salida 0 o Infraout si está abajo.

 

 

En la parte de abajo están marcadas las Entradas/Salidas 0-1-2-3-4 y los pines de Positivo (+V) y Masa (GND).

Podemos realizar diferentes pruebas con una plaquita como la que hemos  diseñado para poder conectar directamente sobre la placa de pruebas de Picaxe.

 

 

Hay conectados 3 leds (salidas 0, 1 y 2), un pulsador en la entrada 3 y un potenciómetro en la entrada 4.

Los programas que puedes realizar son los siguientes:

  1. Encender tres leds alternativos (semáforo).
  2. Encender tres leds (semáforo) 10 veces.
  3. Encender un semáforo después de pulsar un pulsador.
  4. Encender un semáforo con un pulsador y ajustar el tiempo con un potenciómetro.

1.-ENCENDER TRES LEDS ALTERNATIVOS CONECTADOS A LAS SALIDAS 0, 1 Y 2 (SEMAFORO) 

 

symbol t=500
inicio:
high 0
pause t 
low 0
high 1
pause t
low 1
high 2
pause t
low 2
goto inicio

 


2.-ENCENDER ALTERNATIVAMENTE 3 LEDS (SEMAFORO) PERO SOLO 10 VECES

 

symbol t=500
for b0=0 to 9 'repite el ciclo 10 veces
high 0
pause t
low 0
high 1
pause t
low 1
high 2
pause t
low 2
next b0
 

3.-ENCENDER UN SEMÁFORO DESPUÉS DE PULSAR UN PULSADOR

 

 

symbol t=500
inicio:
if pin4=1 then gosub leds 'Si pulsamos la entrada 4 hace el semaforo (leds) sino vuelve a inicio.
goto inicio
leds:
high 0
pause t
low 0
high 1
pause t
low 1
high 2
pause t
low 2
return

 


4.-IGUAL QUE EL PROGRAMA ANTERIOR PERO REGULAMOS EL TIEMPO CON EL POTENCIÓMETRO

 

inicio:
readadc 4,b0
if pin3=1 then gosub leds
goto inicio
leds:
high 0
pause b0
low 0
high 1
pause b0
low 1
high 2
pause b0
low 2
return

 

Con la segunda placa de pruebas he realizado también diferentes prácticas muy sencillas. Esta placa de expansión tiene dos leds (salidas 0 y 1) y dos entradas analógicas (el potenciómetro en la entrada 2 y la LDR en la entrada 4).

 

 

Podeis realizar tres ejercicios prácticos:

  1. Dos luces intermitentes alternativas.
  2. Igual que el anterior pero el potenciómetro regula el tiempo.
  3. Igual que el anterior pero la LDR regula el tiempo.

1.-LUCES INTERMITENTES ALTERNATIVAS

symbol t=500
inicio:
high 0
pause t
low 0
high 1
pause t
low 1
goto inicio

2.-LUCES INTERMITENTES ALTERNATIVAS CON TIEMPO REGULADOR POR POTENCIÓMETRO

inicio: readadc 4,b0 'potenciometro
high 0
pause b0
low 0
high 1
pause b0
low 1
goto inicio

3.-LUCES INTERMITENTES ALTERNATIVAS CON TIEMPO REGULADOR POR LDR

inicio:
readadc 2,b0 'LDR
high 0
pause b0
low 0
high 1
pause b0
low 1
goto inicio

Por último para esta inciciación a una placa de pruebas de PICAXE podemos realizar estas pequeñas placas de expansión para una comunicación infraroja:

 

 

La primera placa incorora un diodo led emisor de infrarrojos (salida 0) y un microinterruptor cuadruple (entradas 1, 2, 3 y 4).

La segunda placa tiene tres leds (saldas 0, 1, y 2) y el receptor de infrarrojos (entrada 3).

Es muy importante que la alimentación sea de unos 6 voltios, si es inferior el receptor de infrarrojos no funciona correctamente.

El ejemplo realizado lo que hace es encender les en función de los microinterruptores puestos a ON. Esta información se envia mediante la primera placa infrarrojos y la segunda placa se encarga de encender los leds.

 

 

PROGRAMA DEL EMISOR DE INFRARROJOS

inicio:
if pin1=1 then gosub entrada1
if pin2=1 then gosub entrada2
if pin3=1 then gosub entrada3
if pin4=1 then gosub entrada4
infraout 1,b0
pause 50
b0=0
goto inicio
entrada1:
bit1=1
return
entrada2:
bit2=1
return
entrada3:
bit3=1
return
entrada4:
bit4=1
return

PROGRAMA DEL RECEPTOR DE INFRARROJOS

high 2
wait 1
low 2
main:
infrain2 'esperar la nueva señal
if infra = 2 then enciende1 'encender 1
if infra = 4 then enciende2 'encender 2
if infra = 8 then enciende3 'apagar 1
if infra = 16 then todos 'apagar 2
low 1
low 2
low 0
goto main
enciende1:
high 1
goto main
enciende2:
high 2
goto main
enciende3:
high 0
goto main
todos:
high 0
high 1
high 2
goto main

 

Para cualquier duda ya sabeis, un comentario y encantados de ayudar. Esperemos que estas prácticas os sirvan para iniciación al mundo del PICAXE

Comentarios

Impecable, muy buen tutorial podrías por favor compartir los diagramas de las tres tarjetas, también para entender mejor el uso de los jumpers, saludos

I feel that is among the most vital info for me. And i am glad reading your article.
However should commentary on some basic issues, The web
site taste is great, the articles is truly nice :
D. Just right job, cheers

Feel free to visit my site - Isabell - http://Bain76Yu.Jigsy.com/entries/general/How-Encourage-Your-Grand-Openi...

I feel that is among the most vital info for me. And i am glad reading your article.
However should commentary on some basic issues, The web site taste is great, the articles is truly
nice : D. Just right job, cheers

Also visit my web page: Isabell - http://Bain76Yu.Jigsy.com/entries/general/How-Encourage-Your-Grand-Openi...

Hi, Neat post. There is an issue with your site in web explorer, may
test this? IE still is the marketplace leader and a large component of other people will pass over
your excellent writing due to this problem.

my website blogs for business [ socialnetworklist.org - http://socialnetworklist.org/ ]

Hi, Neat post. There is an issue with your site in web explorer, may
test this? IE still is the marketplace leader and a large component
of other people will pass over your excellent writing due to this problem.

my web-site; blogs for business [ socialnetworklist.org - http://socialnetworklist.org/ ]

reverse phone number lookup free with name free phone lookup reverse - https://storify.com/reversecellnum1/find-phone-number cell phone reverse phone number lookup reverse number lookup free cell phone

I am regular reader, how are you everybody?
This article posted at this website is truly nice.

my weblog; Gudrun - http://Armorgames.com/user/johannesen90bain

I am regular reader, how are you everybody? This article posted
at this website is truly nice.

Feel free to surf to my web blog Gudrun - http://Armorgames.com/user/johannesen90bain

We stumbled over here by a different web page and thought I might check things out.
I like what I see so now i'm following you. Look forward to looking into your web page again.

Feel free to visit my site :: free pc game downloads - https://www.mu.ac.ke/index.php/component/k2/itemlist/user/241546

reverse lookup cell phone numbers for free reverse free phone number
lookup reverse phone free lookup - https://storify.com/reversecellnum1/find-a-number lookup cell phone number free

We stumbled over here by a different web page and thought I might check things out.
I like what I see so now i'm following you. Look forward to looking into your web page again.

Here is my page - free pc game downloads - https://www.mu.ac.ke/index.php/component/k2/itemlist/user/241546

cell phone reverse phone lookup - http://reversephonelookup.bid reverse
phone lookup pakistan telephone reverse phone lookup

As the admin of this site is working, no uncertainty very soon it will
be famous, due to its quality contents.

Also visit my web-site productivity software - https://lists.riseup.net/www?email=Mack%20is%20what%20you%20can%20call%2...

As the admin of this site is working, no uncertainty very soon it will be famous, due to its quality
contents.

Feel free to visit my website - productivity software - https://lists.riseup.net/www?email=Mack%20is%20what%20you%20can%20call%2...

My brother suggested I might like this blog. He was entirely right.
This post truly made my day. You can not imagine simply how much time I had spent for this information! Thanks!

Here is my web-site; motorola razr v3 software download
- Esteban - http://eweb.siogon.com/comment/html/index.php?page=1&id=217155 -

My brother suggested I might like this blog. He was entirely right.
This post truly made my day. You can not imagine simply how much time I
had spent for this information! Thanks!

Here is my blog - motorola razr v3 software download - Esteban - http://eweb.siogon.com/comment/html/index.php?page=1&id=217155 -

I am curious to find out what blog platform you're using?

I'm experiencing some minor security issues with my latest site and
I would like to find something more secure.
Do you have any solutions?

Stop by my page; Dj Software Download Free Full Version - http://www.dongquemajiangji.com/comment/html/index.php?page=1&id=161684

I am curious to find out what blog platform you're using?
I'm experiencing some minor security issues with my latest site and I would like to find something more secure.
Do you have any solutions?

my blog post; Dj Software Download Free Full Version - http://www.dongquemajiangji.com/comment/html/index.php?page=1&id=161684

Hello! I know this is somewhat off topic but I was wondering if
you knew where I could find a captcha plugin for my comment form?

I'm using the same blog platform as yours and I'm having problems finding one?

Thanks a lot!

My web site sansa clip software download - http://hnscsshy.cn/comment/html/index.php?page=1&id=245619

Hello! I know this is somewhat off topic but I was wondering if you knew where I could find a captcha plugin for my
comment form? I'm using the same blog platform as
yours and I'm having problems finding one? Thanks a lot!

my web site: sansa clip software download - http://hnscsshy.cn/comment/html/index.php?page=1&id=245619

I as well as my buddies were studying the excellent
tips from the website and so at once came up with a horrible suspicion I
never expressed respect to the web blog owner for those secrets.
All the boys had been for that reason excited to learn them and have absolutely been taking advantage of them.
Many thanks for turning out to be simply considerate and also for figuring out these
kinds of decent resources most people are really wanting
to learn about. Our honest apologies for not saying thanks to you
earlier.

My blog ... Online Marketing Beratung ( http://Www.Theacornmontessori.com/ - http://Www.Theacornmontessori.com/index.php/component/k2/itemlist/user/4... )

I as well as my buddies were studying the excellent tips from the website and so at once
came up with a horrible suspicion I never expressed respect to the web blog owner
for those secrets. All the boys had been for that reason excited to learn them and
have absolutely been taking advantage of them. Many thanks
for turning out to be simply considerate and also for
figuring out these kinds of decent resources most people are
really wanting to learn about. Our honest apologies for
not saying thanks to you earlier.

Take a look at my webpage - Online Marketing Beratung ( http://Www.Theacornmontessori.com/ - http://Www.Theacornmontessori.com/index.php/component/k2/itemlist/user/4... )

Heya are using Wordpress for your blog platform?
I'm new to the blog world but I'm trying to get started and create my own. Do you need any coding knowledge to make your
own blog? Any help would be really appreciated!

Here is my web site ... Cruz - http://Malibu.pw/blogs_post.php?id=245590

Heya are using Wordpress for your blog platform? I'm new to the blog world but I'm trying to get started and create my
own. Do you need any coding knowledge to make your own blog?
Any help would be really appreciated!

My web blog - Cruz - http://Malibu.pw/blogs_post.php?id=245590

Outstanding post, I think website owners should acquire a lot from this site its real
user pleasant. So much wonderful information on here :D.

my web-site: エロ動画タレスト - http://www.flaschenpost.org/

Outstanding post, I think website owners should acquire a lot
from this site its real user pleasant. So much wonderful information on here :D.

My web site - エロ動画タレスト - http://www.flaschenpost.org/

Añadir nuevo comentario

Plain text

  • No se permiten etiquetas HTML.
  • Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.
  • Saltos automáticos de líneas y de párrafos.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.