View previous topic :: View next topic |
Author |
Message |
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
Problem with port D of 30F5015 |
Posted: Sat Dec 07, 2013 2:53 am |
|
|
Hi! I can't set the direction of pins D0 and D11 of this port. I tried this:
Code: |
output_drive(PIN_D0);
output_drive(PIN_D11);
...
*0x02D2=0x0000;
|
Neither of them managed to set these pins to output. After I set the both pins to high level:
Code: |
output_high(PIN_D0);
output_high(PIN_D11);
|
I always have 0 volts on both pins. I have 4.7k pull-up resistors on the pins.
Where is the problem?
Thanks! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19568
|
|
Posted: Sat Dec 07, 2013 3:46 am |
|
|
Classic reason for behaviour like this is 'something else is on the pin'.
OC1, or EMUC2
Latter depends on how the ICD is set up.
Former is the output compare channel 1.
So, how is output compare setup, and how is the iCD set up?.
Best Wishes |
|
|
|