[quote=“drp”]I have just completed the P8055N-2 board.
Th build was well documented and went without issue.
On balance an excellent product.[/quote]
Welcome to the forum and I agree, these cards are well made.
Note that I don’t use the actual DLL, but a Python module on FreeBSD that uses the same HID commands.
[quote=“drp”]During testing I have discovered a couple of dll issues.
- pwm1 and pwm2 outputs will only set to a frequency of 46.9Khz.
I am using the following call to
Private Declare Sub SetPWM Lib “k8055d.dll” (ByVal channel As Integer, Data As Integer, frequency As Integer)
I am expecting that the frequency can be set using an integer value 1,2 or 3:
1 (2929.68Hz)
2 (11718.75 Hz)
3 (46875Hz)
setpwm(1,128, frequency)
It does not matter if frequency is set to 1,2,3 or any other value, the pwm lines produce 46.9 Khz[/quote]
This does not happen in my testing. Using HID command tag 23 and the appropriate other bytes according to the Pascal code of the K8055D.DLL, I can change the PWM frequency as expected. However, that PWM frequency code is only honored when setting channel 1 and is apparently ignored when setting channel 2.
[quote=“drp”]2) pwm1 can be disabled correctly using a call to either of these:
Private Declare Sub ClearAnalogChannel Lib “k8055d.dll” (ByVal channel As Long)
Private Declare Sub ClearAllAnalog Lib “k8055d.dll” ()
However if pwm2 has been activated a call to either clear analogue routines results in pwm2 clearing and out1 setting (With led on)[/quote]
I can reproduce this problem. To be more precise, this happens when SetPWM() was last used to set channel 2 and then one of the SetAnalog or ClearAnalog functions is used.
The bad news is that this seems to be a problem inside the firmware. I cannot see any bug in either the official Pascal library code or my Python code.
The workaround for this seems to be that if you used SetPwm(port, value, frequency) to activate the port, then turn it off with SetPwm(port, 0, 3).
The PWM and DAC ports are the exact same pin on the PIC. The DAC port just has a slewing capacitor and an OP-AMP to make it appear as if there was an analog signal. The SetAnalog functions use different HID command tags so the PWM frequency stays at the default.
[quote=“drp”]The analogue inputs are perhaps not as stable as I would hope.
There appears to be a ± 0.1 V drift
Has anyone experienced this?
I wonder if there is a fluctuating reference voltage in the circuit?[/quote]
Yes, I have experienced that. And this is more pronounced on my K8055N than on the older K8055. I am not 100% sure what causes it. However, these are possible reasons.
The cards don’t really use a separate, stable “reference” voltage for ADC. They use a PIC internal one that is derived from the supply voltage. That supply voltage is the USB 5V supply on the K8055 and 3.3V regulated with a LM317 on the K8055N. Since it powers a number of components on each board, it is naturally subject to noise, which lets the measurement results bounce around somewhat.
For the K8055N, depending on the ambient temperature and the current drawn by the board, the LM317 drop-out voltage can be really close to the 1.7V available. With changing temperature, your card may be going into and out of that drop-out condition.
Regards,
Jan