THE Serial Inkjet Printer kit refuses to print anything when using HYPERTERMINA
Hi everyone,
I am using hyperterminal to control·a· 96 dpi·Serial Inkjet Printer through USB.
I've managed to get the prompt character ">"·with another power supply with the·help of Bean. Thanks Bean, Hope that you·can read this post again.
However, I am still having another problem.
i've tried to send <STX>HELLO<ETX> commands to the kit.
The kit refuses to print anything. I supose that the kit should have the pre-programmed program hp5160x.SXB and the font mapping.
So I would appreciate anyone who can give me some clues how to do it.
Thanks in· advance.
George
I am using hyperterminal to control·a· 96 dpi·Serial Inkjet Printer through USB.
I've managed to get the prompt character ">"·with another power supply with the·help of Bean. Thanks Bean, Hope that you·can read this post again.
However, I am still having another problem.
i've tried to send <STX>HELLO<ETX> commands to the kit.
The kit refuses to print anything. I supose that the kit should have the pre-programmed program hp5160x.SXB and the font mapping.
So I would appreciate anyone who can give me some clues how to do it.
Thanks in· advance.
George
Comments
Your device only uses Tx and Rx and has the RTS looped to DSR. If you have chosen a configuration that requires other handshaking line configurations, you may have trouble even though the baud is right. Also, your keyboard may be set to Terminal or Windows and affect your keys in Hyperterminal. Selection of handshaking is not clearly explained within Hyperterminal, just have to figure out which [noparse][[/noparse]if any] of the Terminals will work for you.
I suggest you use Terminal.com, a shareware product that is much easier to configure. At least it appears that your Serial Inkjet Printer board is operating, pre-programed, and sending a valid prompt.· If you cannot locate it, send me a PM and I'll email a copy to you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Post Edited (Kramer) : 3/4/2008 11:54:40 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Could you please give me some ideas, if available, on this problem.?
Thanks again.
George.
Getting to your serial port settings may be slightly different depending upon what version of the OS you are running. Assuming you might be running XP then you can get to the serial port setup by:
- Right clicking on "My Computer"
- Click on 'Properties"
- Click on "Device Manager" under "Hardware" tab
- Under "Ports (COM & LPT)" Find your serial port
- Select "Properties" then "Port settings" tab
From there set the "Flow control" to "None"
Also, go under the "Advanced" button and try unchecking the "Use FIFO Buffers" or at least set the transmit buffer to 1.
This should get you talking to your board.
You can also get to some of these settings via HyperTerminal but you have to make sure you click on the hang up icon first to change the settings and then click on the connect icon once they are changed.
Another thing I didn't see mentioned is that it sounds like you are using USB to connect to the kit. Are you using a USB to Serial adapter? If so, do you know what chipset is used? If it is anything other than an FTDI based one then I would suggest replacing it. I've heard people having problems with odd USB to serial chipsets but i've never had any issues with the FTDI chips. Those work great!
Good luck,
Robert
Keep the 'Terminal' software handy. One of the big benefits of it is that you have one window for received and another for sent.
Either in 'Terminal' or 'Hyperterminal' you need your flow contro to be 'none'. I wasn't aware that Windows Device Manger allowed you to access those options. It may be that you can get Hyperterminal to work and work well by following Robert's advice.· My buffers were set all the way high, which is the default and this may explain why I've never had good luck with Hyperterminal.
In general, all newer microprocessors have become so fast that flow control is no longer used - just the Tx and Rx unless there is an exceptional need [noparse][[/noparse]the BasicStamp uses a flow control line to initiate programing and reseting the device].· Sometimes you are working with a legacy piece of equipment - like an old modem or printer.
Robert,
The USB to Serial is on the board and provided by Parallax. The board has three plug-ins and can be a bit confusing. One is the USB to your PC, the other two are a RS-232 power in with one signal line [noparse][[/noparse]correction]that can have a BasicStamp control it, and an SX-Key interface for reprograming.
If you don't have the documentation, please download it and read it before trying to offer generalized advice. It isn't the usually type of setup [noparse][[/noparse]requires some reading, thinking, and studying].
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Post Edited (Kramer) : 3/6/2008 9:15:26 AM GMT
With the lack of flow control there is another little useful setting within Hyper Terminal if you want to use it to send text files to a device. If you want to send a LARGER text file you can sort of throttle it back to give the other end a bit time so it will be ready for the next character. You do this by specifying a couple of delays. You can add a tiny delay between characters and also at the end of a line. You can access this in HyperTerminal by:
- File
- Properties
- Settings Tab
- ASCII Setup..
Here you can tweak all sorts of settings. If you find that without flow control you are sendind data too fast just try adding a short delay and see if that helps. It is a very useful thing to remember if you have to talk to older equipment. For those that use Linux I believe MINICOM also has similar settings.
Robert
Are you typing out “<STX>” and “<ETX>”? If so that is the problem. Those are binary values to represent a start and end condition. <STX> is actually a binary value of $02 and <ETX> is actually $03. I don’t recall if HyperTerminal has a facility to send binary values although if you press CNTL-G you inherently send binary value $07. Without being able to send the start and end commands the module will not print the text in between. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
For example if you want to send: 7 decimal, the press and hold <ALT> and then on the keypad type <0><0><7>
Note: The '<' & '>' denote key presses.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Just to mention that there is an embeded mini USB interface inside the inkjet printing board. And i downloaded the latest version of FTDI driver.
Now I tried to use terminal software that kramer provided me. It's quite handy. i can easily change the parameter that I want.
As I send the the command, I choose the ASCII mode. and I send "<STX>hello<ETX>" .
Inside the window, there displays three prompts ">>>". Also I checked the dec number it displays "62 62 62". But i can't get anything from the printing header.
Any suggestion is welcome.
Thanks.
Most importantly, the board is preloaded with the program, EEPROM·is preloaded with fonts, the program is listed in Code 7.2 and Figure 7.2 is the schematic. One really has to read Code 7.2 to fully understand what is doing what.· Fortunately, the "Program Description" clearly explains the available commands.· STX is 2, ETX is 3, ESC is 27 in the Constants listing.· Good Luck!!!!.
I find one omission quite frustrating. The 3 Pin header with S 5 G is not explained or confirmed within the text. As I recall [noparse][[/noparse]and I may be wrong], this is Signal, +5 volts, and Ground respectively.
The relationship to the schematic is questionable as within it, Pin One is an obvious Ground, Pin 3 is an obvious V+ input, and Pin 2 appears to be that Signal pin. Nowhere within the text is there clear mention of the V+input requirement. Might I suggest an Errata sheet be included with any further releases of this text ot clarify power requirements and pinouts?· To add to the confusion, the·RA0 and RA3 appear to be swapped mislabled on the schematic.
I presumed the Signal was an RS-232 RX, but now I am unsure. I believe there is a Parallax document that I haven't located and may explain further.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Post Edited (Kramer) : 3/6/2008 9:45:44 AM GMT
The serial is TTL -- since it goes to a pin on the SX on the board.
The board has it's own voltage reg for 5v and for the power supply for the higher voltage print head. It's an LDO reg. on the 5v side, so it works OK with 5v in, but I usually use 6v and I get more reliable printing.
There are definitely some inconsistencies between the documentation, the inkjet book by Gilliand and the actual delivered board. For one, Gilliand's book mentions in passing that there is more than one font pre-loaded on the board EEPROM -- this is not the case (at least it wasn't for the two boards I received). Indeed, in my tests, the entire upper half of the font set was blank (chars $80-$FF). Another is that some of the remarks refer to a 32 byte text buffer, some to a 64-byte buffer (the pre-loaded SXB driver indeed is a 64 byte buffer).
I've got a slightly revised version of the SXB driver -- I've been trying to find some time to post it -- basically it allows for higher baud rate, lets the host (optionally) sample the serial line as "busy" signal, uses an "addressable" header (e.g. "!IJ") so that the board can share an open-true serial line with other devices, etc.
Plus I created most of the characters in the "enhanced" font set (the bolder font that uses all dots top to bottom for larger, bolder letters). I have the latter as a .bs2 program that downloads the enhanced font to chars $80-$FF so that setting bit7 of any sent char will get you bold, clearing bit7 of any char gives you the pre-installed "utility" font. I'll try to get those posted sometime today or tomorrow.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
- your USB/serial settings on your PC. Do a search on the forums and you will turn up lots of info about possible settings to your USB port that may help establish comm. correctly
- do you have the USB cable plugged in to the board and powered via USB BEFORE powering up the injket board? The way the pre-installed driver works, it looks for a connected and powered usb cable ONCE AT POWERUP -- if it detects a USB connection, it will use the usb and on-board usb driver for comm., otherwise it defaults to the TTL serial header
- that you are sending the correct vals from your terminal. Remember that "STX" is actually hex $02, "ETX" is hex $03, ESC is hex $1B. The ascii chars of your text string are straight ascii.
P.S. attached are two Stamp programs for downloading a bigger, bolder font to chars $80-$FF. Anyone who wants to use this -- be sure to check the serouts in the code -- this was setup for my revised driver that uses "!IJ" for a header, and dispenses with the prompt on the serial side. See comments in the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Thanks for mentioning that the second font is not loaded.
The book is indeed a bit awkward for folks that just want to use the board first.
I have an unfinished HP Ink Jet project that I may finally finish - it prints on chopsticks. At the time, I was hoping to revise the SX/b to download upto to 16 - 16x16 images of Chinese characters rather than plain old A, B, C. But one really needs to walk before they run.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
I've checked the possible problems you've mentioned. I think i am correct in doing them.
when i sending the command "<STX> hello<ETX>", I got a reponse from the inkjet printer with some prompts ">>>". So I am guessing that there is no font at all in my inkjet printer.
So could you or Kramer please tell me how to load font maps using hyperterminal or Terminal to the inkjet board?
thanks again.
George
I would look for simpler explanations first. Receiving the prompt may or may not be indicative, as my reading of the pre-installed SXB driver for the on-board SX has it returning a prompt after the receipt of any invalid serial command, as well as after executing a valid command.
In other words, the prompt can only mean one of three things: "powered up/reset: now ready" OR "valid command executed: now ready" OR "invalid command ignored: ready". The fact that you received 3 prompts in a row would lead me to think you are NOT correctly sending the serial commands, because this is what I would expect to see:
- inkjet board connected to usb, THEN powered up
- "ready" prompt received from board at terminal ">"
- transmit hex $02, 1-64 ascii bytes, hex $03 ("STX", string, "ETX")
- receive one "ready" prompt after *string is done printing*
Receiving 3 prompts, one for each part of your send, makes me think one or more of your sent bytes are not valid commands, and so the driver disregards each of them in turn and immediately returns a prompt (which is what it's supposed to do). I would look to correctly sending serial values first. I would check esp. that STX is being sent correctly, because if STX is good, anything that follows is string (and therefore you can't have bad bytes). If the STX is bad, AND is not a valid command, then the following two bytes would also be "bad" and would return prompts.
Does that make sense?
If you have a Stamp or an SX or something easy to program in BASIC, you could try hooking up the Stamp to the 3pin TTL serial header and see if it works using Parallax's demo BS2 program (which should work "right out of the box"). If that works, then the problem is definitely in your USB/byte transmission.
P.S. Kramer -- I'll get my updated driver posted this weekend. Also my checkbox "drawing" utility for rows works with Word- or byte-sized rows, so it might make things easier for Chinese chars (are you doing simplified or traditional?). I'm guessing you've seen the png-to-data converter at sxlist.com?
The on-board EEPROM is 64kbit, so you can have one single full "extended" font (all 256 chars) or two "normal" fonts (using $00-$7F). I should also add that the book is the book, and is a good discussion of printing, and hacking printheads, etc. The documentation from Parallax is a separate PDF and is good for getting folks going right away with a Stamp. That said, a decent working knowledge of correct ASCII and serial transmission would seem to be required beforehand.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Post Edited (Zoot) : 3/7/2008 1:42:54 PM GMT
Now I've managed to print some characters through usb when i shake the kit.
Just as you said, I need to use "$02 $03" to print something not "<STX> <ETX>".
It seems that I need to learn a bit how to make a delay after pressing the button.
In all, i can make it print some worlds as i expect.
Thanks all again for your kind reply and suggestions.
George
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Seems the text says 1-32 bytes, but you mention 1-64. I suppose I could find the answer in the code, but others may be confused as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Note that the 64 byte buffer is *not* circular -- if you send 64 (or more) bytes, the board will start printing after receives the 64th char.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php