GrandAlf
Advanced Member level 2
I have a program originally written with Bascom for the 89S8252. To make it go a bit faster I have decided to rewrite in "C" (K*e*i*l). I have a problem with Port 1, this is split between input and output on various pins. The input side is active Low via opto, with 4k7 pullups direct to pins. Problem is when an input pin goes low, it usually stays low, even when the souce returns to high. Resetting the cpu clears it to high again. It all works fine with the Bascom prog, so the hardware is OK. 8052 series do not appear to have direction control, so this cannot be the cause. Rather baffled by this. I am using AT898252.h, and using "if (P1_7 == 0) {etc}" for reading. Any help greatly appreciated.