1)funzioni interne al compilatore CCS :
output_high(<pin
name>); output _low(<pin
name>);
input(<pin name>) (vedere help online del C compiler)
2)Scrittura diretta negli opportuni
registri:
set_tris_c(0xff) => tutti
i pin della porta C configurati come input
0x0 tutti
output, 0x11 bit 0 e 4 come input
bit_test(registro,bit);
bit_clear(registro,bit);
bit_set(registro,bit);
3)mappatura del registro: richiede
set_tris_x(value)
#byte port_b = 0x06
(0x07 per la C, 0x08 per la D 0x09 per la E)
invalue = port_b ;
port_b = outvalue;
4)