high / low command

variable

New Member
Hello Guys,

I am writing code for my radio sender/receiver modules.

I got a question regarding high and low commands, why when I say low 2, but sometimes the LED actually turns on? I am using a 08M chip.

eg.
main:
serin ("HELO", b0)
if b0 = 100 then
low 2
end if
goto main

Cheers!

James
 

ylp88

Senior Member
You don't have any command in your program to turn your LED on in the first place. Make sure you also select your serial baud and pin.

Check that you have your LED the right way around. If your LED is connected to the positive supply with the cathode connected to the PICAXE input pin then a LOW command will light the LED - a high voltage at the LED's anode and a low voltage at the PICAXE pin (the LED cathode) turns the LED on.

ylp88
 
Last edited:

Andrew Cowan

Senior Member
On an 08M, by defult pin 2 is an input, thus high resistance, so the LED is off.

Make pin 2 low, and it makes it an output (pulled low). An LED connected between +V and the pin would then light up.

A
 
Top