This is a multi-part message in MIME format. --------------090102050206040205000004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by pch.mit.edu id m5KITu1H007440 Tom=E1s =D3 h=C9ilidhe wrote: > Wouter van Ooijen wrote: > =20 >> Depending on the currents, I might have selected a HC595 for the low=20 >> side driver, saving some PIC pins. >> =20 >> =20 > > Somebody mentioned this chip to me already. I looked it up and go its=20 > datasheet but I couldn't make any sense of it. Haven't a clue what it d= oes. > > =20 Here a small sample. You can also chain more device. Have fun Nicola > ;TRISB =3D output for these 3 pin > #define out_latch595 PORTB,1 ;pin 12 of HC595 > #define out_data595 PORTB,2 ;pin 9 of HC595 > #define out_sck595 PORTB,3 ;pin 11 of HC595 > > > UDATA > X RES 1 > Y RES 1 > > ... > movlw b'01010101' ;lsb =3D pin QA > call Write595 > ... > > > Write595 > movwf Y ;save data to send > > movlw .8 > movwf X ;bit counter > > bcf out_latch595 > bcf out_sck595 > =20 > lp595 > bcf out_data595 > rlf Y,f ;next bit goes to carry > btfsc STATUS,C > bsf out_data595 > > nop ;some device require a small=20 > pause not all > > bsf out_sck595 ;low to high transition causes bit=20 > data shifted > bcf out_sck595 > > decfsz X,f > goto lp595 > > bsf out_latch595 ;Latch: transfer data to output pin > return --------------090102050206040205000004 Content-Type: image/gif; name="hc595.gif" Content-Disposition: inline; filename="hc595.gif" Content-Transfer-Encoding: base64 R0lGODlhkQEbAaIAAP////8AAABAgMDAwAAA/4ADPQAAAAAAgCH5BAAAAAAALAAAAACRARsB AAP/CLrc/jDKSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6 n9CodEqtWq/YrHbLhQ0o30lYMo6UzeC0WL1uk9loOOT8oDvsDXxeXuffK3oLgQqDAIWHXYmK i4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0hH57bnG5c7cMiL2C wLa7vMR/xrjIv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ChHjoJIBqikTCiJPoI JnqijZCiKuqXLboF+2kTmOmfNEqTyuaZDIqgOnqjOLqjsbkFLPqiXRCkQgqkScAasdEAsTEa vTEc0YEb0wGlxPGkRYokR7ocSzqlvqGlqkEcq+GlXfqlYsocVfokV6qlUYobW6oaoKEcDoCk XkqmZbpbSJCkdsqmYeqmUJobssGkYsqmVDqnZlqneHqnSfqnbfqneBoBbRqociqoc3SkhTqp iTqlfOobcgqnawqpI3CVlXqon/oAlbs6pnFaql+6HJw6qEcQqqEaplvqpGn6pLKapqkKSLVa jrfqBDHqF8VYkj16o5dZo4Pxqz/ambuao7marMq6rMx6bNfUrNAardI6rdQ6gSVTrdiardq6 rdx6O4fXrTFwrPUkrjxKrrtGrBrIn8iarsLqowgDrvAar/I6r/Rar/Z6r/iar/q6r/zar/76 rwDrJOaKMAPra+gag+rqrgjbrsB6oA2roPUUsBI7sRRbsRZ7sRibsRq7sRzbCAkAADs= --------------090102050206040205000004 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 7bit -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------090102050206040205000004--