help me in programming

nevil010

Member
my plan is to turn on a led using a 18m2 chip from computer ?i only have a axe027 cable..

please tech me what is setxd!
 

nick12ab

Senior Member
Sertxd sends serial data to the computer - like the serout command but fixed baud rate.

The command you want is the serrxd command which receives serial data from the computer.

Example code:
Code:
'Example for computer control of an LED connected to pin B.0 of a PICAXE
#picaxe 18m2
symbol led = b.0
main:
	serrxd b0
	if b0 = "1" then
		high led
	elseif b0 = "0" then
		low led
	end if
	goto main
 
Last edited by a moderator:

hippy

Ex-Staff (retired)
@ nick12ab : Hope you don't mind but I edited your code.

Normally I'd just comment and leave to be changed but I would guess nevil010 might just copy and paste so this seemed the best path this time.
 

russbow

Senior Member
Look carefully at the program.

If you make b0="1" then you willlight the led.

Now try b0="0" to turn it off
 

manuka

Senior Member
I assume you mean the editor's inbuilt "F8" terminal display ? With normal (& USB-D9 adapter) serial cables it's 4800 bps - Rev. Ed's AXE027 of course automatically drops to 1500bps when that "non standard" option is selected.
 

Buzby

Senior Member
I think the problem here is that for an inexperienced user who's native language is not English, and who is using an AXE027, the only option on the Terminal screen which mentions AXE027 is the non-standard one.

May be this option should be labeled 'non-standard, may not work with all cables', or something like that.
 

manuka

Senior Member
As often recently mentioned,I now rarely use the AXE027 & so had not previously spotted this conundrum. It merits clarification,even for experienced PICAXErs & native English speakers.
 

hippy

Ex-Staff (retired)
It doesn't seem that unclear to me; select baud rate, 300, 600, etc to 76800 or a non-standard baud rate (AXE027 only).
 

Attachments

Buzby

Senior Member
Unlearn English, then decide which option to click when all you can recognise is AXE027.

I too don't use AXE027, but I did initially interpret that option as being the one to use with AXE027
( It could be presumed the AXE027 uses a non-standard something as it's proprietary, so this is the only option to use with a AXE027.)
 

Paix

Senior Member
It doesn't seem that unclear to me; select baud rate, 300, 600, etc to 76800 or a non-standard baud rate (AXE027 only).
You actually hit the nail on the head Hippy. Unfortunately you mentioned what the message meant and not what it said.

Meaning: Non-Standard baud rate (AXE027 only)
Message: Non-Standard (AXE027 only)

Good I think to change the message for PE6. It's not a big deal and I can see both sides but it would, I think, help just a little.
 

nevil010

Member
i am new to picaxe that's why i am posting forums....i should have googled but this is more helpful and easy way...@hippy .ya my native language is not english mine is malayalam...do you know it?have you even heard about it?
and thanks paix manuka and buzby for supporting me...
No hard feelings right guys :p :D
and thank you JimPerry for telling me it is not non standard..
 
Top