Hi Guys,
Could someone please verify the program below?
It should create a pulse on pin_c1 but does not. The good thing is I
found three different ways to fix this, all functionally the same IMO.
Is this a bug or am I missing something (again)?
Joep
include 16f877a
pragma target clock 20_000_000
pragma target OSC hs
pragma target WDT disabled
pin_c1_direction = output
procedure PwmIrLed'put(bit in ii) is
pin_c1 = ii
end procedure
alias serial_sw_tx_pin is PwmIrLed ; (1)
;alias serial_sw_tx_pin is pin_c1 ; (1) use pin as an alias works okay
;alias pp is serial_sw_tx_pin ; (2) put the alias here works okay.
forever loop
alias pp is serial_sw_tx_pin ; (2)
pp = true ; (3)
;serial_sw_tx_pin = true ; (3) using serial_sw_tx_pin alias (and
not pp) works okay
_usec_delay(1)
pp = false
;serial_sw_tx_pin = false
_usec_delay(1)
end loop
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---