News:

Let's find out together what makes a PIC Tick!

Main Menu

Passing a Port Pin over to a procedure

Started by JohnB, Jun 10, 2022, 01:49 PM

Previous topic - Next topic

JohnB

How can I pass a Port pin over in a Procedure?
e.g.

Proc GetTemperature(PortPin As port)

where PortPin can be one of a number of pins.

JohnB

top204

Take a look at the Pin variable John. Page 24 of the Positron8 manual.

I'll extend the examples for it when I have the time, and expand on its mechanism, because it uses a mask value of the Port and Bit (pin) number.


JohnB

JohnB

JohnB

Can you explain why this is hanging the program
dim s as string
proc HMI_SendString(CompName As String, Message As String)
  s = CompName + ".txt=" + Message + "ÿÿÿ"
  HrsOut2 s
EndProc

when I call the procedure with this
  HMI_SendString("lblMsg", "RTC OK")the program fails

but when I write
HrsOut2 "lblMsg.txt=RTCOKÿÿÿ"
JohnB

JohnB

forget that need to define the length
JohnB

JohnB

JohnB