Please give me a sample code

jayanthd

New Member
Please give me a sample code to blink LED connected P1 of AXE 08M. I am using PICAXE Editor 6.x

I have registered version of Proteus 8.2 SP2 and have license for PICAXE VSM that is in Proteus for PICAXE. I need to blink and LED using AXE08M in Proteus.

This is the error I am getting in Proteus.

ISIS Release 8.02.02 (Build 18911) (C) Labcenter Electronics 1990- 2014.
Compiling design 'C:\Users\System Administrator\Desktop\PICAXE Projects\08M\LED Blink\LED Blink.pdsprj'.
Netlist compilation completed OK.
Netlist linking completed OK.
Partition analysis completed OK.
Simulating partition [E55CF952]
PROSPICE 8.02.00 (Build 18620) (C) Labcenter Electronics 1993-2014.
Loaded netlist 'C:\Users\SYSTEM~1\AppData\Local\Temp\LISA0363.SDF' for design 'LED Blink.pdsprj'
PICAXE-08M VSM Model 0.0.4 (c) Revolution Education Ltd 2007-08 www.picaxe.co.uk [U1_U1]
PICAXE program compile failed... [U1_U1]
#picaxe 08M [U1_U1]
^ [U1_U1]
line # 7, char # 1 Error: syntax error [U1_U1]
Cannot run PICAXE program! [U1_U1]
Real Time Simulation failed to start.


and this is my code.

Code:
' LED Blink.bas

symbol	a_while = 500
symbol	LED1 = 1
symbol	LED2 = 2

#picaxe 08M

do
	high	LED1
	low	LED2
	pause	a_while
	low	LED1
	high	LED2
	pause	a_while
loop
 

hippy

Technical Support
Staff member
If you run PICAXE VSM, select Help -> Sample Designs -> (Registered PICAXE VSM Samples) -> Commands -> Wait Command.DSN

That will give you an 08M design which flashes a LED on pin 4.

I am not sure what the issue is with your program, because when I modify this sample to run your code it behaves exactly as expected, simulates just fine.

Your VSM model seems to be a little out of date compared to what I have so it may be worth checking you have the latest version installed.
 

hippy

Technical Support
Staff member
Thank you. I finally got it working.
That's good news. Could you explain what the problem was and/or how you solved it in case someone else encounters the same or a similar problem in the future. Thanks.
 

jayanthd

New Member
I replaced the .LML files with the .LML files from this file.

http://www.picaxe.com/downloads/vsm_models_402.zip

I am attaching the simulation video. I used Proteus 8.2 SP2 for simulation.

Actually what I did was.

I had installed the last version of PICAXE VSM on my Win 8.1 Enterprise system but it was crashing on opening. I had license for it but was not able to run it due to this. I also have Proteus 8.2 SP2. So. I replaced the models, .lml and .lib files in Proteus 8.2 SP2 related to PICAXE with files from this file.

http://www.picaxe.com/downloads/vsm_models_402.zip

and also I replaced all the PICAXE tools in Proteus 8.1 SP2 with PICAXE tools from PICAXE VSM and it worked.
 

Attachments

Last edited:
Top