Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:00 07 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : HX711

Author Message
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:19am 17 Sep 2014
Copy link to clipboard 
Print this post

Hi all

I have been looking at an HX711 24bit AtoD for load cells
the data sheet has a timing chart that suggests the SCK
pin should be toggled at 50us or less I have some crude code for the Micromite but I don't think the Micromite is quick enough.
Is this something that can be done with the new plugin feature ?
My C is well C...p so any assistance will be greatly appreciated

2014-09-17_191645_hx711.pdf


Dim Weight(25)

PD_SCK = 3
DT = 4

SetPin Dout, DIN
SetPin PD_SCK, DOUT

Main:
Pin(PD_SCK) = 0

Do While Pin(DT) = 1
Loop

For I = 0 To 24
Pin(PD_SCK) = 1
Pin(PD_SCK) = 0
Weight(I) = Pin(DT)
Next I


For I = 0 To 24
Print Weight(I)
Next I


Regards
Jman
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 09:36am 17 Sep 2014
Copy link to clipboard 
Print this post

Could you not use SPI for that?

Microblocks. Build with logic.
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 07:30pm 17 Sep 2014
Copy link to clipboard 
Print this post

The problem is that SPI only handles 8 or 16 bits at a time, whereas JMan needs 24 bits.

I'm wanting to play with Neopixels and have the same issue, they use timing and 24 bits.

The Plugin feature is the way to go but my C is not the best either.

- Rob.
For crying out loud, all I wanted to do was flash this blasted LED.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025