No se como hacerlo con solo el 08M pero si puedes conseguir un Decade Counter chip (4017B) podrias hacer secuencias de hasta 10 LED's.Hola a todos ,soy novato en el Foro.
Alguien podria ayudarme, como encender secuencialmente 8 Leds ,con un Picaxe 08.
Gracias de antemano ,un saludo.
El circuito que muestran en página 7 es lo que necesitas, donde dice "solenoid" pones el relay. Para que active y desactive es simplemente por instrucciones en el programa.queria saber si hay alguna posibilidad de cambiarlo y hacer como una especie de flip-flop osea que al ingresar la clave active el rele y al ingresarla nuevamente lo desactive (seria como un suiche on/off) mil gracias
PD: habria que cambiar FET por un rele
Hola Sedeap, un gusto conocerte...Si tienes alguna duda y no puedes hallar la respuesta en el manual, o no entiendes como buscarla, pregunta aqui, en este hilo de consultas en español...
;*******************************************************************
;******** Tabla de caracteres ASCII para LCD NOKIA *****************
;*******************************************************************
'''0x00,0x00,0x5f,0x00,0x00, // 21 !
'''0x00,0x07,0x00,0x07,0x00, // 22 "
'''0x14,0x7f,0x14,0x7f,0x14, // 23 #
'''0x24,0x2a,0x7f,0x2a,0x12, // 24 $
'''0x23,0x13,0x08,0x64,0x62, // 25 %
'''0x36,0x49,0x55,0x22,0x50, // 26 &
'''0x00,0x05,0x03,0x00,0x00, // 27 '
'''0x00,0x1c,0x22,0x41,0x00, // 28 (
'''0x00,0x41,0x22,0x1c,0x00, // 29 )
'''0x14,0x08,0x3e,0x08,0x14, // 2a *
'''0x08,0x08,0x3e,0x08,0x08, // 2b +
'''0x00,0x50,0x30,0x00,0x00, // 2c ,
'''0x08,0x08,0x08,0x08,0x08, // 2d -
'''0x00,0x60,0x60,0x00,0x00, // 2e .
'''0x20,0x10,0x08,0x04,0x02, // 2f /
'''0x3e,0x51,0x49,0x45,0x3e, // 30 0
'''0x00,0x42,0x7f,0x40,0x00, // 31 1
'''0x42,0x61,0x51,0x49,0x46, // 32 2
'''0x21,0x41,0x45,0x4b,0x31, // 33 3
'''0x18,0x14,0x12,0x7f,0x10, // 34 4
'''0x27,0x45,0x45,0x45,0x39, // 35 5
'''0x3c,0x4a,0x49,0x49,0x30, // 36 6
'''0x01,0x71,0x09,0x05,0x03, // 37 7
'''0x36,0x49,0x49,0x49,0x36, // 38 8
'''0x06,0x49,0x49,0x29,0x1e, // 39 9
'''0x00,0x36,0x36,0x00,0x00, // 3a :
'''0x00,0x56,0x36,0x00,0x00, // 3b ;
'''0x08,0x14,0x22,0x41,0x00, // 3c <
'''0x14,0x14,0x14,0x14,0x14, // 3d =
'''0x00,0x41,0x22,0x14,0x08, // 3e >
'''0x02,0x01,0x51,0x09,0x06, // 3f ?
'''0x32,0x49,0x79,0x41,0x3e, // 40 @
'''0x7e,0x11,0x11,0x11,0x7e, // 41 A
'''0x7f,0x49,0x49,0x49,0x36, // 42 B
'''0x3e,0x41,0x41,0x41,0x22, // 43 C
'''0x7f,0x41,0x41,0x22,0x1c, // 44 D
'''0x7f,0x49,0x49,0x49,0x41, // 45 E
'''0x7f,0x09,0x09,0x09,0x01, // 46 F
'''0x3e,0x41,0x49,0x49,0x7a, // 47 G
'''0x7f,0x08,0x08,0x08,0x7f, // 48 H
'''0x00,0x41,0x7f,0x41,0x00, // 49 I
'''0x20,0x40,0x41,0x3f,0x01, // 4a J
'''0x7f,0x08,0x14,0x22,0x41, // 4b K
'''0x7f,0x40,0x40,0x40,0x40, // 4c L
'''0x7f,0x02,0x0c,0x02,0x7f, // 4d M
'''0x7f,0x04,0x08,0x10,0x7f, // 4e N
'''0x3e,0x41,0x41,0x41,0x3e // 4f O
'''0x3e,0x41,0x51,0x21,0x5e, // 51 Q
'''0x7f,0x09,0x19,0x29,0x46, // 52 R
'''0x46,0x49,0x49,0x49,0x31, // 53 S
'''0x01,0x01,0x7f,0x01,0x01, // 54 T
'''0x3f,0x40,0x40,0x40,0x3f, // 55 U
'''0x1f,0x20,0x40,0x20,0x1f, // 56 V
'''0x3f,0x40,0x38,0x40,0x3f, // 57 W
'''0x63,0x14,0x08,0x14,0x63, // 58 X
'''0x07,0x08,0x70,0x08,0x07, // 59 Y
'''0x61,0x51,0x49,0x45,0x43, // 5a Z
'''0x00,0x7f,0x41,0x41,0x00, // 5b [
'''0x02,0x04,0x08,0x10,0x20, // 5c
'''0x00,0x41,0x41,0x7f,0x00, // 5d
'''0x04,0x02,0x01,0x02,0x04, // 5e
'''0x40,0x40,0x40,0x40,0x40, // 5f
'''0x00,0x01,0x02,0x04,0x00, // 60
'''0x20,0x54,0x54,0x54,0x78, // 61 a
'''0x7f,0x48,0x44,0x44,0x38, // 62 b
'''0x38,0x44,0x44,0x44,0x20, // 63 c
'''0x38,0x44,0x44,0x48,0x7f, // 64 d
'''0x38,0x54,0x54,0x54,0x18, // 65 e
'''0x08,0x7e,0x09,0x01,0x02, // 66 f
'''0x0c,0x52,0x52,0x52,0x3e, // 67 g
'''0x7f,0x08,0x04,0x04,0x78, // 68 h
'''0x00,0x44,0x7d,0x40,0x00, // 69 i
'''0x20,0x40,0x44,0x3d,0x00, // 6a j
'''0x7f,0x10,0x28,0x44,0x00, // 6b k
'''0x00,0x41,0x7f,0x40,0x00, // 6c l
'''0x7c,0x04,0x18,0x04,0x78, // 6d m
'''0x7c,0x08,0x04,0x04,0x78, // 6e n
'''0x38,0x44,0x44,0x44,0x38, // 6f o
'''0x7c,0x14,0x14,0x14,0x08, // 70 p
'''0x08,0x14,0x14,0x18,0x7c, // 71 q
'''0x7c,0x08,0x04,0x04,0x08, // 72 r
'''0x48,0x54,0x54,0x54,0x20, // 73 s
'''0x04,0x3f,0x44,0x40,0x20, // 74 t
'''0x3c,0x40,0x40,0x20,0x7c, // 75 u
'''0x1c,0x20,0x40,0x20,0x1c, // 76 v
'''0x3c,0x40,0x30,0x40,0x3c, // 77 w
'''0x44,0x28,0x10,0x28,0x44, // 78 x
'''0x0c,0x50,0x50,0x50,0x3c, // 79 y
'''0x44,0x64,0x54,0x4c,0x44, // 7a z
'''0x00,0x08,0x36,0x41,0x00, // 7b
'''0x00,0x00,0x7f,0x00,0x00, // 7c
'''0x00,0x41,0x36,0x08,0x00, // 7d
'''0x10,0x08,0x08,0x10,0x08, // 7e
'''0x78,0x46,0x41,0x46,0x78 // 7f
;******************************************************************
;******Configuracion de puertos y variables para nuestra rutina y hardware**********
;******************************************************************
symbol SCLK = 0 'Display pin 2 to PICAXE out 0
symbol SDA = 1 'Display pin 3 to PICAXE out 1
symbol DC = 2 'Display pin 4 to PICAXE out 2
symbol CS = 3 'Display pin 5 to PICAXE out 3
symbol RES = 4 'Display pin 8 to PICAXE out 4
symbol Loop1 = b0
symbol Value= b1
symbol Loop2 = b2
symbol Command = b3
symbol Counter = b4
symbol X = b6
symbol Y = b7
symbol Mask = b8
symbol Loop3 = b9
;**********************************************************
;****************** rutina de control ***************************
;**********************************************************
setfreq m8
gosub Init
gosub black
for Loop3=0 to 0 ; aca van las veces que se repite
X=4*loop3
Y=Loop3
gosub GotoXY
gosub PRname
next
gosub normal
setfreq m4
start:
pause 500
gosub black
pause 500
gosub invert
pause 500
gosub white
pause 500
gosub normal
goto Start
PrName:
Command = 0
for Loop1 = 0 to 100 ;aca se guarda el conteo de la cantidad de caracteres de la palabra
read Loop1,Value
gosub WriteToLCD
next Loop1
return
Init:
EEPROM 0,(....aca van los caracteres de la lista superior....)
low SCLK
low SDA
low DC
low CS
low RES
pause 20
low RES
pause 500
high RES
high CS
Command = 1
for Loop1 = 0 to 5 ‘ comienza el bucle
read Loop1, Value ‘ lee el valor de la EEPROM
gosub WriteToLCD ‘ transmite al lcd
next Loop1
gosub white
X = 0
Y = 0
gosub GotoXY
gosub clearfast
gosub normal
return
;***********************************************************
;****************variables de control ****************************
;**********************************************************
WriteToLCD:
high DC 'Data mode
if Command = 0 then DataMode
low DC 'Command mode
DataMode:
low CS
for Loop2 = 1 to 8
low SCLK
Mask = Value & 128
low SDA
if Mask = 0 then Skiphigh
high SDA
Skiphigh:
high SCLK
Value = Value * 2
next Loop2
high CS
return
ClearFast:
low SDA
high DC
low CS
for Loop1=1 to 48
for Loop3= 1 to 84
low SCLK
high SCLK
next loop3
next Loop1
return
GotoXY:
Command = 1
Value = X + 128
gosub WriteToLCD
Value = Y + 64
gosub WriteToLCD
return
Invert:
Command = 1
Value = 13
gosub WriteToLCD
return
Black:
Command = 1
Value = 9
gosub writetolcd
return
White:
command=1
value=8
gosub writetolcd
return
Normal:
command=1
value=12
gosub writetolcd
return
Como diria Condorito...PLOP!!OK... Fernando, estamos de acuerdo, pero ese post tiene 3 años de antigüedad,si el tipo no lo ha solucionado ya, debe haber abandonado hace rato el tema... (con un 08)
"N9600_16" means "9600 baud if the PICAXE's clock frequency is set to 16 MHz", which is actually equivalent to N2400_4 (2400 baud at clock frequency 4 MHz). Baud rate increases if clock frequency increases.Hi, I'm new to PICAXE. I have a problem .. even though the manual says that the PICAXE 14M (not M2 or X2) can transmit at 9600 baud with the command:
The Programming Editor's terminal shows only garbage.Code:serout 0, N9600_16 ("PRUEBA 9600", CR, LF)
I have tried the combinations:
With the same result.Code:serout 0, N9600_16 ("PRUEBA 9600", CR, LF) serout 0, T9600_16 ("PRUEBA 9600", CR, LF)
If I reduce the baud rate to 4800, "serout 0, 4800, ("TEST 9600", CR, LF)" works perfect!
Any help?
Thanks a lot.
SETFREQ M8 'set clock frequency to 8 MHz
SEROUT 0, N9600_8 ("PRUEBA 9600", CR, LF)
SETFREQ M8 'ajusta la frecuencia de sistema a 8 MHz
SEROUT 0, N9600_8 ("PRUEBA 9600", CR, LF)
Esa es mi idea... pero no puedo hacer funcionar la función "Count" en la simulación. Tenés algún ejemplo que funcione para darme?Welcome to the Forum.
I hope Google translate works.
A magnet on the spokes.
A reed relay on the fork.
The Picaxe uses the "Count" command.
Un imán en los radios.
Un RELAY REED en el tenedor.
El PICAXE utiliza el "Count" comando.
e
Si tienes alguna duda y no puedes hallar la respuesta en el manual, o no entiendes como buscarla, pregunta aqui, en este hilo de consultas en español...
Hola seferman,hola deseo saber como debo escribir esta rutina correctamente porque el editor me da error al verificar la syntax
borrar:
data b0,($FF)
pause 50
goto main
Puedes eliminar uno de los dos errores cambiando lo siguiente:borrar:
data b0,($FF)
pause 50
goto main
Hola:hola deseo saber como debo escribir esta rutina correctamente porque el editor me da error al verificar la syntax
borrar:
data b0,($FF)
pause 50
goto main
eeprom 0,(“abcd”) ; inicializa EEPROM con un valor al momento de grabar/cargar el prog al picaxe
main:
for b0 = 0 to 10 ; comienza ciclo
read b0,b1 ; lee valor EEPROM
serout B.7,N2400,(b1) ; transmite al LCD
next b0 ; proximo ciclo
goto main
recibe:
for b0 = 0 to 63 ; comienza ciclo
serin C.6,N2400,b1 ; recibe serial (valor)
write b0,b1 ; escribe valor de b1 en b0
next b0 ; proximo ciclo
b1 = 80
b2 = 175
b3 = 400
b4 = 90
b5 = 400
b6= 25
inicio:
if input0 is on then bala 'si la entrada 0 es "1" salta a subrutina bala sino a inicio
if input1 is on then balb 'si la entrada 1 es "1" salta a subrutina balb sino a inicio
if input2 is on then balc 'si la entrada 2 es "1" salta a subrutina balc sino a inicio
if input6 is on then bald 'si la entrada 6 es "1" salta a subrutina bald sino a inicio
goto inicio 'salto a inicio
bala: `entrada a
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
low 0,1,2
pause b1
high 0,1,2
high 0,1,2
pause b1
low 0,1,2
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
low 3,4,5
pause b1
high 3,4,5
high 3,4,5
pause b1
low 3,4,5
balb: `entrada b
high 0
pause b2
low 0
high 5
pause b2
low 5
high 0
pause b2
low 0
high 5
pause b2
low 5
high 0
pause b2
low 0
high 5
pause b2
low 5
high 0
pause b2
low 0
high 5
pause b2
low 5
high 0
pause b2
low 0
high 5
pause b2
low 5
high 0
pause b2
low 0
high 5
pause b2
low 5
high 0
pause b2
low 0
high 4,5
pause b3
low 4,5
high 0,1
pause b3
low 0,1
high 4,5
pause b3
low 4,5
high 0,1
pause b3
low 0,1
high 4,5
pause b3
low 4,5
high 0,1
pause b3
low 0,1
high 4,5
pause b3
low 4,5
high 0,1
pause b3
low 0,1
high 4,5
pause b3
low 4,5
high 0,1
pause b3
low 0,1
high 4,5
pause b3
low 4,5
high 0,1
pause b3
low 0,1
high 4,5
pause b3
low 4,5
high 0,1
pause b3
low 0,1
high 4,5
pause b3
low 4,5
balc: `entrada c
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
high 0,1,2,3,4,5
pause b1
low 0,1,2,3,4,5
low 0,1,2,3,4,5
pause b1
high 0,1,2,3,4,5
low 0,1,2,3,4,5
bald: `entrada d
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 2,3
pause b6
high 2,3
high 2,3
pause b6
low 2,3
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 0,5
pause b6
high 0,5
high 0,5
pause b6
low 0,5
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
low 1,4
pause b6
high 1,4
high 1,4
pause b6
low 1,4
pause b5
goto inicio 'salto a inicio
b1 = 80 'A variable
'con (with)
Symbol Delay80mS = 80 'A constant
bala:
For b10 = 1 To 4 'Repeat the whole sequence - 4 times
For b11 = 1 To 3 'Flash 0,1,2 - 3 times
high 0,1,2
pause Delay80mS
low 0,1,2
pause Delay80mS
Next b10
For b10 = 1 To 3 'Flash 3,4,5 - 3 times
high 3,4,5
pause Delay80mS
low 3,4,5
pause Delay80mS
Next b11
Next b10
Goto inicio 'Return to the main loop