|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Problem with Ethernut-Board: Pin 3 on PortBHi all!
I have a problem with pin 3 at PortB. Whenever i set pin 3 and pin 4 to high, voltage on pin3 drops to ca 1 volts. when pin4 is not set to high, everything is fine. The same occurs on 3 different Ethernut-Boards, so i dont think it is an hardware-fault. The Board is a Ethernut 2.1 RevB, Nut/OS is Version 4.6.4 my Code: #include <stdio.h> #include <io.h> void main() { sbi(DDRB,0); sbi(DDRB,1); sbi(DDRB,2); sbi(DDRB,3); sbi(DDRB,4); sbi(DDRB,5); sbi(DDRB,6); sbi(DDRB,7); sbi(PORTB,3); sbi(PORTB,4); while(1) { int i = 0; } } with leds attached to the pins, every pin works fine, except pin3 which goes down when pin4 is high. Has anybody noticed something like this before? What am i doing wrong? Thanks in advance Roman ______________________________________________________________________________ SMA Solar Technology AG Aufsichtsrat: Dr. Erik Ehrentraut (Vorsitzender) Vorstand: Guenther Cramer, Peter Drews, Roland Grebe, Pierre-Pascal Urbon, Marko Werner Handelsregister: Amtsgericht Kassel HRB 3972 Sitz der Gesellschaft: 34266 Niestetal USt-ID-Nr. DE 113 08 59 54 WEEE-Reg.-Nr. DE 95881150 ______________________________________________________________________________ _______________________________________________ http://lists.egnite.de/mailman/listinfo/en-nut-discussion |
|
|
Re: Problem with Ethernut-Board: Pin 3 on PortBHi!
> I have a problem with pin 3 at PortB. Whenever i set pin 3 and pin 4 to high, > voltage on pin3 drops to ca 1 volts. when pin4 is not set to high, everything is fine. This sounds quite strange. Can you give me some ascii art of your external wiring? Are these boards from egnite or are they self build? Your code looks fine, there should'nt be any problem. Regards, Ole -- _____________________________________________________________ | | | Embedded-IT | | | | Ole Reinhardt Tel. / Fax: +49 (0)271 7420433 | | Luisenstraße 29 Mobil: +49 (0)177 7420433 | | 57076 Siegen eMail: ole.reinhardt@... | | Germany Web: http://www.embedded-it.de | |_____________________________________________________________| _______________________________________________ http://lists.egnite.de/mailman/listinfo/en-nut-discussion |
|
|
Re: Problem with Ethernut-Board: Pin 3 on PortBHi Roman,
Roman Walpuski wrote: > I have a problem with pin 3 at PortB. Whenever i set pin 3 and pin 4 to high, > voltage on pin3 drops to ca 1 volts. when pin4 is not set to high, everything is fine. Please have a look to http://www.ethernut.de/en/hardware/enut2/ports.html PB1, PB2 and PB3 are used by SPI. PB4 is the positive chip select of the only on-board SPI slave, the serial Dataflash chip. Setting PB4 to high will select this chip and enable its output connected to PB3. You should avoid to use PB1-PB3 for GPIO. If you need to, you must keep PB4 low. If you don't need the Dataflash at all, you may cut the trace coming from the Via near IC11 pin 1. R7, a pull-down, will keep pins 1 and 2 low and you can use PB4 for GPIO too (schematic page 2). Harald _______________________________________________ http://lists.egnite.de/mailman/listinfo/en-nut-discussion |
| Free embeddable forum powered by Nabble | Forum Help |