BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Jul 17, 2018 6:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Very simple input output syntax query....
PostPosted: Sun Mar 13, 2016 11:58 am 
Offline
Citizen

Joined: Fri Mar 01, 2013 7:09 pm
Posts: 19
You 'read' an input as 1 or 0, yet you have to 'set' an output with words – 'high' or 'low' – is this correct?

Can an output not be set with a numerical value i.e. just 1 or 0 ?

In essence, what is the shortest code to set an output as 'high' on the condition that 2 inputs are also 'high' ?

It seems to be this…

If in0 = 1 and in1 =1 then
high p2
endif

When something like this would seem logical and neater ?

p2 = in0 AND in1


Many thanks for your help,

Ian


Top
 Profile  
 
 Post subject: Re: Very simple input output syntax query....
PostPosted: Tue Mar 15, 2016 11:20 pm 
Offline
Master

Joined: Wed Oct 19, 2011 2:28 am
Posts: 123
Hi,
You can use the command as follow:
OUT(bit number) ' OUT0..OUT63 output any bit ----- for your application to output P2 = OUT2

OUT2 = (IN0 and IN1 )


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO