Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 12089

Re: Fan etc on external i2c-controller

$
0
0
Its not quite that simple.. it not a byte, but multiple bytes

using M260 you have to manipulate the individual registers inside the chip

The following is a example from a pic processor, but it goes into details on all the registers and and eg
See [openlabpro.com]

so this should work for led 0,%50on/%50off (I have not tested it)

;init the chip
M260 A64
M260 B00 ;Control register set to address 00h
M260 B33 ;(0x21) Mode 1 configured to with AI=1 and ALLCALL=1
M260 S1

;set led0 50on/50off
M260 A64
M260 B06 ;Control register set to address LED0_ON_L
M260 B00 ;Writing 8 LSB bits of ON count
M260 B08 ;Writing 4 MSB bits of ON count
M260 B00 ;Writing 8 LSB bits of OFF count
M260 B08 ;Writing 4 MSB bits of ON count
M260 S1

Viewing all articles
Browse latest Browse all 12089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>