Olin Lathrop wrote: > David Duffy (AVD) wrote: > =20 >>> Writing values to the port registers isn't going to have any effect >>> until you set the pins to outputs. At the very least this means >>> clearing the TRIS bits, but may also require disabling analog >>> peripherals associated with the pins of interest. Just writing 0 >>> then some value to the port registers has no chance of producing a >>> visible result without making pins outputs. >>> =20 >> This is probably where I'm missing something. The structure of the >> ports is obviously different to what I'm used to. >> =20 > > Not really. The TRIS and PORT registers work just like on a PIC 16. The > PIC 18 also has LAT registers, but you can still use the PORT register as > you did before. > > =20 >> I did read the data >> sheet, but have not yet got a grip on how the port really work. >> =20 > > Again, ignore LAT and they work just like on a PIC 16. > =20 Yes, my silly mistake was in the port initialisation. I have no idea why=20 I wrote PORTx where I meant TRISx. That coupled with me not=20 understanding the banking was my undoing. Maybe I shouldn't try to=20 learn a new chip so close to bedtime! David... --=20 ___________________________________________ David Duffy Audio Visual Devices P/L Unit 8, 10 Hook St, Capalaba 4157 Australia Ph: +61 7 38235717 Fax: +61 7 38234717 Our Web Site: www.audiovisualdevices.com.au ___________________________________________ --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .