The latest solution is a refinement of an earlier idea.
Yes, everything is clear now, thank you. You draw an additional diode using 3 lines.
A perfectly reasonable approach, but it does require some work on the existing character sets we currently have.
/*
* Compare gate voltages to distinguish JFET from MOSFET
*/
/* set probes: probe-1 -- Vcc / probe-2 -- Rl -- Gnd / probe-3 -- Rh -- Gnd */
R_PORT = 0; /* pull down drain via Rl & gate via Rh */
...
/* consider intrinsic or optional flyback diode (causes low Diff_2) */
if (Diff_2 < (Offset / 2)) /* diode */
{
/* swap Diff_1 and Diff_2 */
/* to fix reversed D/S issue caused by diode */
U_1 = Diff_1;
Diff_1 = Diff_2;
Diff_2 = U_1;
}
/*
* Compare gate voltages to distinguish JFET from MOSFET
*/
/*
* check if we got a p-channel JFET or depletion-mode MOSFET
* - JFETs are depletion-mode only
*/
if (Flag != SIGNAL_FET) /* no n-ch dep-mode FET found */
...
Back to JFETs with an integrated flyback diode. Yuriy_K has such an n-ch JFET. But are there also p-ch JFETs with a diode?
Hello people, getting crazier and crazier, I am trying to update the firmware from version 1.40 to 1.52, since I had to return the programmer, since I have not been able to make it work, I set up the connection this way
Hello people, getting crazier and crazier, I am trying to update the firmware from version 1.40 to 1.52, since I had to return the programmer, since I have not been able to make it work, I set up the connection this way
You should have a 12-22pF a capacitor from pin 9 to ground and from pin 10 to ground. Oscillator may be unstable without them.
Also, putting a 0.1uF capacitor across pins 7 & 8 might be a good idea.
If I found the makefile, should I just replace it with the one I recently used or should I do something else???
/*
* display unsigned value plus unit (character)
* - scales value to max. 4 digits excluding "." and unit
*
* requires:
* - unsigned value
* - exponent of factor related to base unit (value * 10^x)
* e.g: p = 10^-12 -> -12
* - unit character (0 = none)
*/
void Display_Value(uint32_t Value, int8_t Exponent, unsigned char Unit)
{
unsigned char Prefix = 0; /* prefix character */
uint8_t Offset = 0; /* exponent offset to lower 10^3 step */
uint8_t Index; /* index ID */
uint8_t Length; /* string length */
/* scale value down to 4 digits */
while (Value >= 10000)
{
Value += 5; /* for automagic rounding */
Value = Value / 10; /* scale down by 10^1 */
Exponent++; /* increase exponent by 1 */
}
/*
* determine prefix and offset (= number of digits right of dot)
*/
if (Exponent >= -15) /* prevent index underflow */
{
Exponent += 15; /* shift exponent to be >= 0 */
Index = Exponent / 3; /* number of 10^3 steps */
Offset = Exponent % 3; /* offset to lower 10^3 step */
if (Offset > 0 || !UpScaleReadout) /* dot required */
{
Index++; /* upscale prefix */
Offset = 3 - Offset; /* reverse value (1 or 2) */
}
/* look up prefix in table */
if (Index < NUM_PREFIXES) /* prevent array overflow */
{
Prefix = DATA_read_byte(&Prefix_table[Index]);
}
}
/*
* display value
*/
#ifdef UI_COLORED_VALUES
Display_UseValueColor(); /* set value color */
#endif
/* convert value into string */
utoa((uint16_t)Value, OutBuffer, 10); /* radix 10: max. 5 chars + /0 */
Length = strlen(OutBuffer); /* get string length */
/* we misuse Exponent for the dot position */
Exponent = Length - Offset; /* calculate position */
if (Exponent <= 0) /* we have to prepend "0." */
{
/* 0: factor 10 / -1: factor 100 */
Display_Char('0'); /* display: 0 */
#ifdef UI_COMMA
Display_Char(','); /* display: , */
#else
Display_Char('.'); /* display: . */
#endif
if (Exponent < 0) /* factor 100 */
{
Display_Char('0'); /* additional 0 */
}
}
if (Offset == 0) /* no dot needed */
{
Exponent = -1; /* disable dot */
}
/* adjust position to match array or disable dot if set to 0 */
Exponent--;
/* display value and add dot if requested */
Index = 0;
while (Index < Length) /* loop through string */
{
Display_Char(OutBuffer[Index]); /* display char/digit */
if (Index == Exponent) /* starting point of decimal fraction */
{
#ifdef UI_COMMA
Display_Char(','); /* display: , */
#else
Display_Char('.'); /* display: . */
#endif
}
Index++; /* next one */
}
#ifdef UI_COLORED_VALUES
Display_UseOldColor(); /* reset pen color */
#endif
/* display prefix and unit */
if (Prefix) Display_Char(Prefix);
if (Unit) Display_Char(Unit);
UpScaleReadout = 1; /* disable scaling flag */
}
void Show_SingleResistor(uint8_t ID1, uint8_t ID2)
{
Resistor_Type *Resistor; /* pointer to resistor */
Resistor = &Resistors[0]; /* pointer to first resistor */
/* show pinout */
Display_Char(ID1);
Display_EEString(Resistor_str);
Display_Char(ID2);
/* show resistance value */
Display_Space();
UpScaleReadout = 0;
Display_Value(Resistor->Value, Resistor->Scale, LCD_CHAR_OMEGA);
}