Skip to main content
Submitted by johngriswold on Wed, 09/28/2016 - 11:01

Please clarify my thoughts, here. I'm a complete newcomer to this controller (DMC30016)

I am trying to trigger a data acquisition box with a low-edge pulse. I thought if I simply did
OP $0F ;' set all pins high just because?
SB 2 ;Set pin to start with
<do some other stuff>
#LOOP
CB 2 ;'set pin low
WT 1000 ;' Wait a full second
SB 2 ;' Set pin high again
WT 1000
JP #LOOP
EN

I should see a square wave with a frequency with a two-second interval.

I am not seeing this. I am not seeing anything on the output. I've tried this with bits 1, 2, and 4 with the same results (one can never tell if a prior user of the controller had fried one of the outputs. Unlikely that they'd fried three of them).

Do I need other control code? Do I need a pullup on the pin? Do I misunderstand the meaning of set and clear?

Thanks in advance!
John

Comments 2

johngriswold on 09/30/2016 - 08:47

I had help, but figured it out. I neglected to apply external power as on p. 36 of the manual. I was expecting the output to just toggle between +5 and zero. Yeah, I know - what a programmer.

KushalP on 01/25/2017 - 16:49

Hi John,

Your approach is correct. With the Digital Output wired, it will work. Glad to hear you were able to resolve your issue.