Ive got another slight problem with this. Ive just tried to control some optoisolators using porte.0 and porte.2. For some strange reason the pins just wont turn on. I added some test code and the correct data is getting to the chip. It copies a bit from the serial data directly to the pin (EG, porte.0=btemp.0). Right after if i check the status of the pin it shows as 0. Ive had a look in the datasheet and i can see that porte gets used for parallel communications but i have set the tris registers to disable it and use it as a general I/O. I have something else connected to porte.1 and that works fine :S
Edit: It seems that changing the status of another pin is causing those pins to turn off. I had this the other night with portA too. Turning 1 output on would turn another off automatically. Im going to look through all the code again incase theres a silly mistake somewhere
Bookmarks