Que tal yuhe,
antes que nada debes saber que PBP no maneja variables de 32bits a menos que uses un microcontrolador de la seie PIC18 y usando el compilador PBPL. Este no es tu caso, ya que estás usando el microcontrolador PIC16F887A. Por lo tanto tendremos que usar tres variables del tipo byte para realizar la lectura. PBP tampoco tiene funciones, solo subrutinas, así que lo que haremos será la siguiente:
'************************************
'Definición de variables
'************************************
dato_hx711_H var byte 'parte alta del resultado del ADC del hx711
dato_hx711_M var byte 'parte media del resultado del ADC del hx711
dato_hx711_L var byte 'parte baja del resultado del ADC del hx711
i var byte 'Variable auxiliar para cilocs FOR
'************************************
'Definición de puertos
'************************************
dat var PORTB.0
clk var PORTB.1
'****************************************
' Subrutina para leer el hx711
' ENTRADAS: Ninguna
' SALIDAS: dato_hx711_H, dato_hx711_M y dato_hx711_L
'*********************************************
Leer_HX711:
if (dat = 0) then
dato_hx711_H=0
dato_hx711_M=0
dato_hx711_L=0
for i = 0 to 7
dato_hx711_H = dato_hx711_H<<1
High clk
Pauseus 10
if (dat=1) then
High dato_hx711_H.0
else
Low dato_hx711_H.0
endif
Low clk
Pauseus 10
Next i
for i = 0 to 7
dato_hx711_M = dato_hx711_M<<1
High clk
Pauseus 10
if (dat=1) then
High dato_hx711_M.0
else
Low dato_hx711_M.0
endif
Low clk
Pauseus 10
Next i
for i = 0 to 7
dato_hx711_L = dato_hx711_L<<1
High clk
Pauseus 10
if (dat=1) then
High dato_hx711_L.0
else
Low dato_hx711_L.0
endif
Low clk
Pauseus 10
Next i
High clk
Pauseus 10
Low clk
dato_hx711_H = dato_hx711_H^$80
dato_hx711_M = dato_hx711_M^$00
dato_hx711_L = dato_hx711_L^$00
endif
return
Espero esto te ayude en tu proyecto.
elreypic.