Other Parts Discussed in Thread: BOOSTXL-PGA460, ENERGIA, PGA460
Hi,
I'm testing on a customer issue. test condition : BOOSTXL-PGA460, Energia , getDistance.ino, test object:0.6m. test code as below attached.
I've verfied the result between GUI and Energia. their perfomance including echo amplititude are matched. but when I only changed Threshold in pga460::initThresholds(byte thr) function, the dump result show the echo amplititude is quite different. you can use my attached code and just change the Threshold as below to verify. I've also tested on GUI, no matter how I change the Threshold, there are no big difference. please suggest how this threshold changing connecting to this echo amplititude? thanks.
test code:
only changed below code in my attached file, You can verify this issue.
void pga460::initThresholds(byte thr)
{
switch (thr)
{
case 0: //25% Levels 64 of 255
P1_THR_0 = 0x0;
P1_THR_1 = 0x0;
P1_THR_2 = 0x0;
P1_THR_3 = 0x0;
P1_THR_4 = 0x0;
P1_THR_5 = 0x0;
P1_THR_6 = 0x0;
P1_THR_7 = 0x0;
P1_THR_8 = 0x0;
P1_THR_9 = 0x0;
P1_THR_10 = 0x0;
P1_THR_11 = 0x0;
P1_THR_12 = 0x0;
P1_THR_13 = 0x0;
P1_THR_14 = 0x88;
P1_THR_15 = 0x88;
P2_THR_0 = 0x88;
P2_THR_1 = 0x88;
P2_THR_2 = 0x88;
P2_THR_3 = 0x88;
P2_THR_4 = 0x84;
P2_THR_5 = 0x21;
P2_THR_6 = 0x8;
P2_THR_7 = 0x42;
P2_THR_8 = 0x10;
P2_THR_9 = 0x80;
P2_THR_10 = 0x80;
P2_THR_11 = 0x80;
P2_THR_12 = 0x80;
P2_THR_13 = 0x0;
P2_THR_14 = 0x88;
P2_THR_15 = 0x88;
break;