The Museum of HP Calculators


Miller Indices for Cubic Crystal for HP-33s

This program is by Ed Look and is used here by permission.

This program is supplied without representation or warranty of any kind. Ed Look and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

This calculates the Miller indices for three planes from three peaks of an X-ray powder diffraction pattern, like the one for the HP-48G/G+/GX, except this one's for the 33s.

It requires input first of the crystal's lattice parameter, then three peaks from the powder pattern, in any order.

The output will be the lattice parameter as it was input, and then the three Miller index sets, one for each plane (peak).

Listing

Miller Indices (h k l) from Cubic X-Ray Diffraction Powder Patterns for the HP-33s

 
B0001   LBL B   this sets up the loop control
B0002   FIX 3
B0003   INPUT A input of the lattice parameter
B0004   STO A
B0005   2.004
B0006   STO i
C0001   LBL C
C0002   INPUT Q this input is actually 2θ (Q because the
C0003   2       HP-33s has no Greek letters)
C0004   ÷
C0005   SIN
C0006   RCL A   this section (LBLs C, D, E, and F) is 
C0007   ×       the calculation of the Miller indices
C0008   2       and loops to occur three times, which
C0009   ×       accomodates three diffractogram peaks
C0010   1.54
C0011   ÷
C0012   x2
C0013   STO(i)
C0014   FP
C0015   0.5
C0016   x>y?
C0017   GTO D
C0018   GTO F
D0001   LBL D
D0002   RCL(i)
D0003   IP
E0001   LBL E   also in E is the formatting of the
E0002   ENTER   display of the indices in the 33s
E0003   √x
E0004   IP
E0005   100
E0006   ×
E0007   STO(i)
E0008   100
E0009   ÷
E0010   x2
E0011   -
E0012   ENTER
E0013   √x
E0014   IP
E0015   10
E0016   ×
E0017   STO+(i)
E0018   10
E0019   ÷
E0020   x2
E0021   -
E0022   √x
E0023   IP
E0024   STO+(i)
E0025   ISG i
E0026   GTO C
E0027   RCL A   display of the lattice parameter
E0028   PSE
E0029   RCL B   display of Miller indices of 1st plane
E0030   PSE
E0031   FIX 0
E0032   RCL C   display of Miller indices of 2nd plane
E0033   PSE
E0034   RCL D   display of Miller indices of 3rd plane
E0035   RTN     and this all fills the four stack levels
F0001   LBL F
F0002   RCL (i)
F0003   IP
F0004   1
F0005   +
F0006   GTO E
F0007   RTN

Go back to the software library
Go back to the main exhibit hall