I'm writing a program to output a stair step waveform from VoutA. How do I tell PORTP to output 2 volts?
#include "d:\miniide\hc12.inc"
org $1000
ldaa #$FF
staa DDRP ; configure PORTP for output
ldaa #$6F
staa DDRCAN ; configure PCAN6..PCAN5 for output
bclr PORTCAN,$20 ; select VOUTA output
xx xxxxx ; need to know how to output 0 volts
bclr PORTCAN,$40 ; generate a rising edge on PORTCAN6 pin
bset PORTCAN,$40 ; "
jsr delay
xx xxxxx ; need to know how to output 2 volts
bclr PORTCAN,$40 ; generate a rising edge on PORTCAN6 pin
bset PORTCAN,$40 ;
jsr delay
xx xxxxx ; need to know how to output 4 volts
bclr PORTCAN,$40 ; generate a rising edge on PORTCAN6 pin
bset PORTCAN,$40 ;
jsr delay
end