> I've never used, or had to use, LATD.x on the 18F's.
> But if you say it takes care of some of the R-M-W issues,
> then it must be true.
This might be worth deepper inspection..
I'm sorry I didn't identify the problem clearly-basicly LCDout works just fine. LCD-display can be used only for testing purposes cause it's so damn slooooow.. o:-) That's why all lcd-routines are normally bypassed by "naytto" input signal. Only problem is that if I want to use LCDout for testing, it will shut down (low) portD.7 output (MAGN) as well.. There cannot be hardware problem cause in next line I put pulsout portD.7,65530 command for testing purposes and it will flash Led in portD.7 but I cannot understand why in previous line command portD.7=1 (Magn=1) will NOT illuminate the same led.. (see line marked in RED=near lines 145 and 182)
as i said, you want to use LATD instead of PORTD. Pulsout also do more than a single PORT/LAT=x. If my memory serves me well it set the TRIS.. then do what it has to do. Hence wasting a few instruction cycle before and after... why the R-M-W behaviour don't happen.. or is reduced to a minimum.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
> as i said, you want to use LATD instead of PORTD.
Ok, u do have a point and that must be the issue here.. BUT..
could it be so that the LCDout-command is causing this RMW behaviour and not the other way around?
I mean without LCDout everything works fine.. o:-)
what can I do about that build-in LCDout-command?
I don't have time and energy to write my own LCDout-command..
o:-)
> as i said, you want to use LATD instead of PORTD.
Ok, Now i know it is about RMW. As I put "pause 5000" right after portD.7=1 command, the led in portD.7 will light for 5seconds.
There ain't any other solution than find another port for output-like portB.1?
Last edited by mara; - 24th January 2008 at 22:28.
Bookmarks