Post Reply 
3421A CAL RAM
05-14-2019, 06:53 AM
Post: #35
RE: 3421A CAL RAM
(04-26-2019 03:17 AM)djd328 Wrote:  Ah, looking at other posts with cal constant sets, the Y intercept field is surely just BCD encoded. Didn't see that before, simple enough, yes those are trivially interpreted -ve numbers.

Building on the work of fenugrec, here is a simple decoder for 3468, minus the checksum which is different. I have managed to get the first 2 nibbles of that almost disentangled... simple xor sum mostly is correct, but there is a carry or something missing. The second 2 nibbles, not yet. Anyway:

Code:

MacPro$ cat hp3468B/hp3468B.cal.good
@@@@@@@@@@@@OOOOIIIIIGDOEM@EAIFHIIIIIIHODEMNOJEC@@@@@@DODCLBOMEH@@@@@@@OD@BDOBM@​@@@@BD@OCKBOIENK@@@@@@@@ANAAO@LC@@@@@@@@ALMEOJMG@@@@@@@@@BKEOCNG@@@@@@@@@ABAOMN@​@@@@@@@@@@ELOFOO@@@@@@@@ABNNOLLC@@@@@AF@BM@DNBLO@@@@@@@@@@@@OOOO@@@@@@@@@@@@OOOO​@@@@@@@@@@@@@@@
MacPro$
MacPro$ gcc cal.c -o cal ; ./cal < hp3468B/hp3468B.cal.good
RRRR YYYYYYY GGGGG SSSS  Offset  Gain

     0000000 00000 ffff  0000000 1.00000000
0.3v 9999974 f5d05 1968 -0000025 0.99470502
  3v 9999998 f45de fa53 -0000001 0.99446803
 30v 0000004 f43c2 fd58  0000004 0.99426204
300v 0000000 f4024 f2d0  0000000 0.99402404
 acv 0000240 f3b2f 95eb  0000240 0.99251902
300r 0000000 01e11 f0c3  0000000 1.00081098
 3kr 0000000 01cd5 fad7  0000000 1.00057507
30kr 0000000 002b5 f3e7  0000000 1.00015509
300k 0000000 00121 fde0  0000000 1.00012100
  3M 0000000 0005c f6ff  0000000 1.00004590
 30M 0000000 012ee fcc3  0000000 1.00117803
  3A 0000016 02d04 e2cf  0000016 1.00170398

And the program itself
Code:

MacPro$ cat cal.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

static char *range[] = {
"",
"0.3v", "3v", "30v", "300v",
"acv",
"300r", "3kr", "30kr", "300k", "3M", "30M",
"3A",
"", "" };

static char h[] = "0123456789abcdef";

int
main (int argc, char *argv[])
{
   unsigned char cal[256];
   int i, j;
   signed char o;
   float f, s;

   read(0, cal, 255);

   for (i=0; i<255; i++) cal[i] -= 0x40;

   printf("RRRR YYYYYYY GGGGG SSSS  Offset  Gain\n\n");
   for (i=0; i<13; i++) {
      printf("%4s ", range[i]);
      for (j=0; j<7; j++) printf("%c", h[cal[i*16 + j]]);
      printf(" ");
      for (j=7; j<12; j++) printf("%c", h[cal[i*16 + j]]);
      printf(" ");
      for (j=12; j<16; j++) printf("%c", h[cal[i*16 + j]]);

      o = 0;
      if (cal[i*16] > 3) o = 9;
      printf(" %c", o ? '-' : ' ');
      for (j=0; j<7; j++) printf("%c", o ? h[o-cal[i*16 + j]] : h[cal[i*16 + j]] );
      printf(" ");

      f = 1.0;
      s = 100.0;
      for (j=7; j<12; j++) {
         o = cal[i*16 + j];
         o = o > 7 ? o - 16 : o;
         f += ((float) o ) / s;
         s *= 10;
      }
      printf("%1.8f", f);

      printf("\n");
   }
}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
3421A CAL RAM - Dave Frederickson - 03-30-2017, 05:49 AM
RE: 3421A CAL RAM - Hans Brueggemann - 03-30-2017, 09:14 AM
RE: 3421A CAL RAM - Dave Frederickson - 03-30-2017, 03:30 PM
RE: 3421A CAL RAM - BobVA - 03-30-2017, 05:10 PM
RE: 3421A CAL RAM - Dave Frederickson - 03-30-2017, 05:50 PM
RE: 3421A CAL RAM - Dave Frederickson - 04-02-2017, 04:20 PM
RE: 3421A CAL RAM - BobVA - 04-02-2017, 04:59 PM
RE: 3421A CAL RAM - Dave Frederickson - 04-02-2017, 05:24 PM
RE: 3421A CAL RAM - J-F Garnier - 04-02-2017, 07:53 PM
RE: 3421A CAL RAM - cruff - 04-03-2017, 01:12 AM
RE: 3421A CAL RAM - Dave Frederickson - 04-03-2017, 02:17 AM
RE: 3421A CAL RAM - cruff - 04-05-2017, 12:08 AM
RE: 3421A CAL RAM - Hans Brueggemann - 04-02-2017, 07:56 PM
RE: 3421A CAL RAM - Dave Frederickson - 04-02-2017, 08:43 PM
RE: 3421A CAL RAM - Paul Berger (Canada) - 04-03-2017, 12:46 AM
RE: 3421A CAL RAM - Dave Frederickson - 04-03-2017, 12:57 AM
RE: 3421A CAL RAM - Dave Frederickson - 04-03-2017, 05:26 PM
RE: 3421A CAL RAM - BobVA - 04-04-2017, 04:08 PM
RE: 3421A CAL RAM - Dave Frederickson - 04-04-2017, 05:16 PM
RE: 3421A CAL RAM - J-F Garnier - 04-05-2017, 07:45 PM
RE: 3421A CAL RAM - Dave Frederickson - 04-05-2017, 07:53 PM
RE: 3421A CAL RAM - djd328 - 04-25-2019, 05:24 AM
RE: 3421A CAL RAM - Dave Frederickson - 04-25-2019, 08:44 PM
RE: 3421A CAL RAM - djd328 - 04-26-2019, 02:56 AM
RE: 3421A CAL RAM - djd328 - 04-26-2019, 03:17 AM
RE: 3421A CAL RAM - djd328 - 05-14-2019 06:53 AM
RE: 3421A CAL RAM - J-F Garnier - 04-04-2017, 08:38 PM
RE: 3421A CAL RAM - BobVA - 04-05-2017, 07:13 PM
RE: 3421A CAL RAM - Paul Berger (Canada) - 04-04-2017, 07:39 PM
RE: 3421A CAL RAM - BobVA - 04-05-2017, 03:36 AM
RE: 3421A CAL RAM - Dave Frederickson - 04-12-2017, 04:45 AM
RE: 3421A CAL RAM - juani_cer - 01-31-2018, 11:19 PM
RE: 3421A CAL RAM - Dave Frederickson - 02-01-2018, 01:28 AM
RE: 3421A CAL RAM - juani_cer - 02-01-2018, 11:46 PM
RE: 3421A CAL RAM - J-F Garnier - 02-01-2018, 08:45 AM
RE: 3421A CAL RAM - BobVA - 05-16-2019, 10:02 PM
RE: 3421A CAL RAM - Boeingflieger - 08-05-2024, 02:20 PM
RE: 3421A CAL RAM - cdmackay - 08-06-2024, 08:27 AM
RE: 3421A CAL RAM - Boeingflieger - 08-06-2024, 08:53 AM
RE: 3421A CAL RAM - Dave Frederickson - 08-06-2024, 10:07 AM
RE: 3421A CAL RAM - cdmackay - 08-07-2024, 02:54 PM



User(s) browsing this thread: 2 Guest(s)