Hi,
this is not the right list, I know, but at very least I hope someone
will direct me to a list likely to produce some insight to my problem.
I using PIC18F4550 and so far I've got remarkable little problems.
However I've not been able to control the bit 2 of PORT D.
I'm observing the direct outputs from the MCU pin with oscilloscope.
I've looked at the code produced by SDCC and it makes perfect sence.
So I'm thinking this is something to do with some PIC18 configuration
or
some registers not being set up properly.
I've been up and down the datasheet but have not found anything
that would get me further.
My code is as follows:
#define STEP_X PORTDbits.RD0
#define STEP_X_TRIS TRISDbits.TRISD0
#define STEP_Y PORTDbits.RD1
#define STEP_Y_TRIS TRISDbits.TRISD1
#define STEP_Z PORTDbits.RD2
#define STEP_Z_TRIS TRISDbits.TRISD2
<snip>
STEP_X_TRIS = 0;
STEP_Y_TRIS = 0;
STEP_Z_TRIS = 0;
<snip>
for (;;) {
STEP_X = 0;
STEP_Y = 0;
STEP_Z = 0;
LED_PIN = 0;
delay_ms(2);
STEP_X = 1;
STEP_Y = 1;
STEP_Z = 1;
LED_PIN = 1;
delay_ms(2);
}
br Kusti
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user