Go Down

Topic: mega2560 pin23 output problem (Read 754 times) previous topic - next topic

luxiaofan

I make pin23 output high,but the voltage is 0.88v.Is this pin broken?the schematic show inattachment,thank you!!

OldSteve

#1
Apr 15, 2016, 09:12 am Last Edit: Apr 15, 2016, 09:12 am by OldSteve
Please post your code.
Place it between code tags, generated by the </> button in the "Reply" window, or manually like this:-

[code]Place your code here[/code]

Code: [Select]
It will appear in a block like this
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

luxiaofan

when I use usb for power supply,the high level can be 5v,but when I use the power convert by L5970D,the high level only 0.88v.the test code show here,power supply schematic show in attachment  ,thank you!
Code: [Select]
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(7, HIGH);  // turn the LED on (HIGH is the voltage level)
  digitalWrite(8, HIGH);
  digitalWrite(9, HIGH);
  digitalWrite(10, HIGH);
  delay(1000);              // wait for a second
  digitalWrite(7, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);
  digitalWrite(10, LOW);

 
  delay(1000);              // wait for a second
}

OldSteve

#3
Apr 15, 2016, 09:56 am Last Edit: Apr 15, 2016, 10:01 am by OldSteve
Where exactly in this is pin13 actually made an output? :-
(Comments don't count. :D )
And despite the comment in your code, your thread title says pin 23, which also isn't made an output in 'setup()'.
Code: [Select]
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
}


Edit: In your original post, you said:-
Quote
I make pin23 output high
Do you actually have any code that makes it either OUTPUT or HIGH?

Do you read your code before posting?
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

MalharD

Doesn't the OP say pin 23 in the original post ??
He didn't declare pin 23 as output.

@OldSteve How did you made the code tags not to format as code ?

-Malhar
Murphy always gets me ...

OldSteve

Doesn't the OP say pin 23 in the original post ??
He didn't declare pin 23 as output.
Yeah, I was just editing as you posted. :)

Quote
@OldSteve How did you made the code tags not to format as code ?
-Malhar
My little secret. :D



I won't try to type it, I'll attach a text file below.

Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

MalharD

Okay, I got it. Thanks for sharing your little secret.



-Malhar
Murphy always gets me ...

luxiaofan

#7
Apr 18, 2016, 02:11 am Last Edit: Apr 18, 2016, 02:24 am by luxiaofan
well,thank you for response.Digital pin10 means pin23,I mean HEATER_E0 connect to digital pin10.when I  use usb for power supply ,HEATER_E0 can output high level with 5.0v,but when I use L5970D for power supply it can only output high level with 0.88v.please look at attachment.thank you

Go Up