Author Topic: Digital levels  (Read 1891 times)

Bojan

  • Newbie
  • *
  • Posts: 2
Digital levels
« on: November 21, 2017, 08:17:15 pm »
Hi group,
I am very new with Digispark and I have a problem already....

My initial setup looks like this:

  pinMode(0, OUTPUT);  // DIR
  pinMode(1, OUTPUT);  // STEP, on-board LED 
  // set pins 3 and 4 to input
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  digitalWrite(3, HIGH);   // and enable pullup resistors
  digitalWrite(4, HIGH);


Problem is, the HIGH voltage at inputs look like are clamped at ~3V... ( I expected 5V, as this is what TTL driver provides unloaded).
With pull-ups enabled, I am measuring the same voltage at those inputs, as if some load is present (Zeners on board are 36V, I believe).
Is there anything else in the setup that needs to be done?

Because of this, Digispark board doesn't work properly when I apply VCC higher than 3.5V (so that HIGH is sometimes interpreted as LOW when VCC is set to 5V)

Thank you for your help in advance!
« Last Edit: November 21, 2017, 08:39:39 pm by Bojan »

Bojan

  • Newbie
  • *
  • Posts: 2
Re: Digital levels
« Reply #1 on: November 21, 2017, 09:37:26 pm »
OK...
I simply removed the  zeners (marked as ''W4"), it seems they are ~2.5V, way too low even for USB, and everything is OK now.

The Universe still works after all...
 
« Last Edit: November 21, 2017, 09:39:09 pm by Bojan »

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Digital levels
« Reply #2 on: December 27, 2017, 07:58:02 pm »
Late response, but yes, that would have been around the expected voltage, although 2.5v was a bit low... but that may be have been due to lower than 5v VCC? The zeners should have been 3V6 or 3.6v clamping diodes, and you'd never get 5v from pins 3 & 4 without removing them. So either move things around keeping that in mind or as you did, remove them, keeping in mind that the USB data pins are no-longer within the spec'd voltage range.

https://digistump.com/wiki/digispark/tutorials/pinguide