Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pulsein in BASCOM 0 or 1

Status
Not open for further replies.

yokohama

Member level 3
Joined
Dec 29, 2010
Messages
55
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
Algeria
Activity points
1,659
Hi,
The definition of the "Pulsein" instruction in bascom help is:

Pulsein var , PINX , PIN , STATE

var: A word variable that is assigned with the result
PINX: A PIN register like PIND
PIN: The pin number(0-7) to get the pulse time of
STATE: May be 0 or 1. 0 means sample 0 to 1 transition and 1 means sample 1 to 0 transition.

In another pdf doc (in french) I found the another explanation of the last parameter (STATE).

Well, I want to know if when I put 0 on STATE I sample the high level (1) or the low level (0) of the input signal ?.
 

hi

my opinion is you sample the transition1 to 0 ie. you get value in var when the pin goes from 1 to 0, this will wait for the transition for max of 655 ms.

hope this helps
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top