Hi, new user here ![]()
I am currently working with a West-Bond K-1400 ultrasonic generator. As you can see it has an 8-bit computer interface which can be used to control the amplitude of the generated electric signal. According to the manual:
Binary 8-Bit TTL input from the bonder controls the output power level. Front panel settings are
ignored and no channel selection signal is needed when these inputs are used. The ultrasonic generator
is active whenever any bit is nonzero. Therefore, the bonder controls bond time directly, by the timing of
the numeric changes at these pins.
So I connected the arduino with the 8 data pins and wrote the following piece of code:
int busStart = 22;
//writes the binary equivalent of the number to the 8-bit bus
void setPowerValue(unsigned char value){
unsigned char mask = 1;
for (int i = 0; i < 8; i++) {
int bitValue = (value & (mask << i)) != 0;
if(bitValue){
digitalWrite(busStart + 2 * i, LOW);
}else{
digitalWrite(busStart + 2 * i, HIGH);
}
}
}
Note: it reads in the maual that the data pins are internally grounded with pull-down resistos, but apparently my model had inverted input and pull-up resistors instead
So this code worked fine when doing small transitions, but when going from 0 straight to 255, it didn't work at all.
After many hours of experimentation, I finally got it to work by adding a 2ms delay between each digitalWrite, writing only one bit at a time. This, however, meant that sending a signal takes 16ms, which is far too much for my intended purposes.
Any ideas of how to proceed with this, or what could be the cause of my problem?