Solved: Input port reading half of Vcc

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I have been testing attached schematic. The idea being I want LED to not glow unless the pushbutton is pressed or the port is made output/logic-0. It works with no issues on PDIP version of tINY84 on a perf board. I got a PCB done based and the tiny84 soic programs with no issues but the port is reading half-Vcc. I tried replacing the SMD diode with TH diode (in original perf board) Still I cant seem to get this working. After playing around with it, the diode  began to glow bright and now it wont turn off. I see that it blinks when I program. I am wondering if I messed up the input circuitry. Is there a difference between the soic version and pdip version? Thanks a bunch!

 

    DDRB |= 1<<INT0_BIT;
    PORTB |= 1<<INT0_BIT;    //turn off led by making it logic-high.
    while(1);

 

PS: I already seem to have broken down 4 soics. I am hesitant to move forward without understanding what is going on.

Attachment(s): 

Last Edited: Tue. Dec 26, 2017 - 09:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The only LED in the attached schematic is the power LED.  Without a complete schematic showing your circuit including the LED and switch wiring, we can only guess what might be wrong, though I do suspect the code may be part of the problem.

 

What is the value of INT0_BIT, is it an #define?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Raving Lunatic,

 

I finally figured it out. Sorry for wasting your time. It was all the freaking fuse bits. I was setting it with CLKOUT enabled. So INT0 pin wasnt modifying. Wish I hadnt wasted time on this all these days:| and blamed it on the ICs!!

 

Thank you once again!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And the brightness issue was just some hacking (read soldering) gone wrong :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcoder wrote:
Hi Raving Lunatic,
Well that says it all I guess! wink

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Tue. Dec 26, 2017 - 07:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh....lol. Pardon me larryvc :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcoder wrote:
I finally figured it out.

Excellent. So please mark the solution: http://www.avrfreaks.net/comment...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

avrcoder wrote:
I finally figured it out.

Excellent. So please mark the solution: http://www.avrfreaks.net/comment...

 

What! And do me out of a job? cheeky

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but editing the title doesn't tell the forum sw that the thread is solved - it still thinks it's an open question ...

 

cheeky

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agreed... but often the poster disappears after the solution is provided/found. Altering the title helps those that might have been tempted to add extra posts. Hopefully they can read.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
Agreed... but often the poster disappears after the solution is provided/found.

@avrcoder: if you're still here, you can still mark the solution!

 

valusoft wrote:
Hopefully they can read.

laugh laugh

 

How long have you been here?!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Arrived one day after your good self.

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's too weird.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@awneil: , Finally received a notification from this thread and seems like there is a lot of discussion. I tried clicking on "Mark Solution" and I am getting a popup error: "An HTTP error 0 occured....". Suggestions?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh dear.

 

I guess the only thing to do is report it under 'Site Feedback' ...

 

frown

 

EDIT

 

Perhaps try sending a PM to user mt_nor - See: http://www.avrfreaks.net/comment...

 

 

 

Last Edited: Fri. Dec 29, 2017 - 01:16 PM