chipKIT® Development Platform

Inspired by Arduino™

Digital output doesnt work as expected!

Created Sat, 25 Jan 2014 21:24:53 +0000 by windwail


windwail

Sat, 25 Jan 2014 21:24:53 +0000

Hi! I have some trouble.

void setup() {
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  
}

void loop() {
  digitalWrite(7, HIGH);
  digitalWrite(8, HIGH);
  digitalWrite(9, HIGH);
  digitalWrite(10, HIGH);
  delay(10000);
}

with this code i measure by voltmeter voltage between 7, 8, 9 and 10 digital ports and ground. There is signal (near 3.3 V) on 9 and 10 ports. But there is no signal on 7 and 8. WTF ? What i do wrong ? Please help!

P.S. My boad is ChipKit Mas32.


windwail

Sun, 26 Jan 2014 09:07:55 +0000

Solved Port must be set in HEX... so 0x11 in hex is 17 in decimail, and 0x10 in hex is 16 :)