![]() |
Forum Index : Microcontroller and PC projects : HX711
Author | Message | ||||
jman![]() Guru ![]() Joined: 12/06/2011 Location: New ZealandPosts: 711 |
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: ThailandPosts: 2209 |
Could you not use SPI for that? Microblocks. Build with logic. |
||||
aargee Senior Member ![]() Joined: 21/08/2008 Location: AustraliaPosts: 255 |
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. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |