Hacking cartridge HP 84/85

Powder and inkjet printing
david
Posts: 73
Joined: Wed Sep 21, 2016 8:43 pm

Re: Hacking cartridge HP 84/85

Post by david »

Hi, do you guys now know the timing/protocol of this printhead? I briefly went through this thread and found a lot of LA capture and discussion. If I missed something, please point me to the conclusion page. I'm thinking, if you don't mind, I can probably programme my ink jet controller to support this head.
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking cartridge HP 84/85

Post by dragonator »

MAsic12345 wrote: Tue Sep 03, 2019 7:29 am dragonator wrote: ↑
Tue Sep 03, 2019 5:37 am
In the Netherlands there are several resellers that carry them as well. I usually buy them there.

have a page?
https://www.antratek.nl/boards/arduino- ... ble/teensy is one of the resellers where I buy that actually carries 4.0 already
david wrote: Tue Sep 03, 2019 10:24 am Hi, do you guys now know the timing/protocol of this printhead? I briefly went through this thread and found a lot of LA capture and discussion. If I missed something, please point me to the conclusion page. I'm thinking, if you don't mind, I can probably programme my ink jet controller to support this head.
Not yet. Page 4 or 5 I think has a summary, but there is no conclusion yet on how to drive it. I am finishing up some small projects that I did not have time for because of the turret, then I will pick inkjet up again and the HP84 is around the top of the list. I will post when I have conclusions (or if I failed)
maxt
Posts: 36
Joined: Fri Apr 26, 2019 10:38 am

Re: Hacking cartridge HP 84/85

Post by maxt »

by the way, I think that a driver for this head would be very easy to adapt also to HP11 heads (C4810A, the ones used by 3DSystems Projet660 - definitely suited for 3DPP). Same number of pins and from the photos they look *exactly* the same, both outside and inside :lol:
MAsic12345
Posts: 116
Joined: Sat Aug 25, 2018 5:26 pm
Location: Poland

Re: Hacking cartridge HP 84/85

Post by MAsic12345 »

Dear friends i got Teensy 4.0
and don’t know how to communicate with ports
syntax that worked on Teensy 3.6 does not work

Someone can tell where I can find information
by ports for Teensy 4.0 thanks in advance
_DSC1610.jpg
_DSC1610.jpg (258.81 KiB) Viewed 29844 times
Attachments
124.png
124.png (50.91 KiB) Viewed 29844 times
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking cartridge HP 84/85

Post by dragonator »

Sadly, I do not know how to write a whole port directly yet. I did dig a little on the forum and the pages, but came up empty. Teensy 4.0 is still rolling out, and not all libraries and functions are completed. I myself still miss the OctoWS2811 library for 4.0 that allows me to try it.
MAsic12345
Posts: 116
Joined: Sat Aug 25, 2018 5:26 pm
Location: Poland

Re: Hacking cartridge HP 84/85

Post by MAsic12345 »

dragonator wrote: Sun Sep 29, 2019 9:16 am Sadly, I do not know how to write a whole port directly yet. I did dig a little on the forum and the pages, but came up empty. Teensy 4.0 is still rolling out, and not all libraries and functions are completed.
maybe you know who you can contact in order to find out how fast are we can switch pins in Teensy 4.0?
Wonko
Posts: 110
Joined: Sat Aug 15, 2015 8:13 pm

Re: Hacking cartridge HP 84/85

Post by Wonko »

The code that describes the CPU of the Teensy 4.0 is here:
https://github.com/PaulStoffregen/cores ... y4/imxrt.h
and the code to read and write digital ports is here:
https://github.com/PaulStoffregen/cores ... ore_pins.h

Reading this, you can set and clear many pins at the same time using a single command. For example,

Code: Select all

digitalWrite(6, 1); 
digitalWrite(7,1);

would - after going through some general stuff and a huge switch statement, call

Code: Select all

CORE_PIN6_PORTSET = CORE_PIN6_BITMASK;
CORE_PIN7_PORTSET = CORE_PIN7_BITMASK;
which is already a factor 20 to 100 faster (no subroutine call, no case statement). Looking up CORE_PIN6_PORTSET and the rest, this equals

Code: Select all

GPIO7_DR_SET = (1<<(CORE_PIN6_BIT)); // PIN6 is 17, so 1<<17 is 0x20000
GPIO7_DR_SET = (1<<(CORE_PIN&_BIT)); // PIN7 is 16, so 1<<16 is 0x10000
so you can shorten this down to a single command:

Code: Select all

GPIO7_DR_SET = 0x20000; // set two pins at the same time
and similar for all the other pins...
MAsic12345
Posts: 116
Joined: Sat Aug 25, 2018 5:26 pm
Location: Poland

Re: Hacking cartridge HP 84/85

Post by MAsic12345 »

What am I doing wrong?
code does not respond
I do not fully understand how it works
May I ask for details?

Code: Select all

byte pinTable[] = {0};
void setup() 
{
pinMode(pinTable[0],OUTPUT); 

}

void loop() 
{
 for(int i=0; i<7; i++) 
 {
# define  CORE_PIN0_BITMASK   ( 1 << (CORE_PIN0_BIT))
 }

}
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking cartridge HP 84/85

Post by dragonator »

Code: Select all

# define  CORE_PIN0_BITMASK   ( 1 << (CORE_PIN0_BIT))
This is not the command to set a pin. It is the programmer language that defines what bit is the teensy pin. Everything that has a #define in front of it is actually replaced by the compiler. In this case, if you type CORE_PIN0_BITMASK, the compiler automagically replaces it with (1 << (CORE_PIN0_BIT)).

The slower but simpler way would be to do just this:

Code: Select all

byte pinTable[] = {2,3,4,5,6,7,8,9};
void setup() {
for(int i=0; i<8; i++) {
  pinMode(pinTable[i],OUTPUT); 
  }
}

void loop() {
 for(int i=0; i<8; i++) {
  digitalWrite(pinTable[i],1);
 }
}
it is slower, but much simpler. This code writes pin 2 to 9 to HIGH as fast as possible. You can then look with the logic analyser how fast this actually is. With the Teensy it should already be incredibly fast, though 2 will be HIGH earlier than 9. For more speed I need to look closer at the core.h file first
MAsic12345
Posts: 116
Joined: Sat Aug 25, 2018 5:26 pm
Location: Poland

Re: Hacking cartridge HP 84/85

Post by MAsic12345 »

it seems to me (digitalWrite(pinTable[x],x);) slow to repeat simulation of a code with a frequency of 3 megahertz

I tried to write code that can quickly display information from cells
into which you can write the protocol model
and it turned out that(digitalWrite(pinTable[x],x);)
does not have time to display information from cells with a frequency of up to 3 megahertz

Or is there another way approximate?
except for the way to write each bit manually with code

Code: Select all

byte pinTable[] = {0,1,2,3,4,5,6,7};
void setup() {
for(int i=0;i<8;i++)
{
  pinMode(pinTable[i],OUTPUT); 
}


}
void loop() 
{
  byte a[] = {1,0,1,0,1,0,1,0,1,0,1,0,1,0};
 byte b[] = {1,0,1,0,1,0,1,0,1,0,1,0,1,0};
 byte c[] = {1,0,1,0,1,0,1,0,1,0,1,0,1,0};
 byte d[] = {1,0,1,0,1,0,1,0,1,0,1,0,1,0};
 byte e[] = {1,0,1,0,1,0,1,0,1,0,1,0,1,0};
 byte f[] = {1,0,1,0,1,0,1,0,1,0,1,0,1,0};
 byte g[] = {1,0,1,0,1,0,1,0,1,0,1,0,1,0};
  
  
  for(int i=0;i<14;i++)
  {
    if (a[i]==1)
    {
     digitalWrite(pinTable[0],1);
    }
    else
    {
    digitalWrite(pinTable[0],0);
    }
    ///////////////////////////////////////////////
    if (a[i]==1)
    {
     digitalWrite(pinTable[1],1);
    }
    else
    {
    digitalWrite(pinTable[1],0);
    }
    ///////////////////////////////////////////////
    if (a[i]==1)
    {
     digitalWrite(pinTable[2],1);
    }
    else
    {
    digitalWrite(pinTable[2],0);
    }
    /
235235.png
235235.png (38.41 KiB) Viewed 29771 times

maybe there is a code similar to this which would go to Teensy 4.0
This code below works on Teensy 3.6

Code: Select all

GPIOD_PDOR |= 1;
__asm__("nop\n\t");
Post Reply