Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:43 20 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Need Help for thermal printing in Picomite

Author Message
Vampire05
Regular Member

Joined: 06/12/2020
Location: Germany
Posts: 88
Posted: 10:28am 19 Jan 2022
Copy link to clipboard 
Print this post

Hi Guys,
i try to print bit image data on a cheap thermal printer, but i do not understand the protocol.

On page 29 (Bit Image Command) in the manual:
https://cdn-shop.adafruit.com/datasheets/CSN-A2+User+Manual.pdf  

i want to print a single dot / line and i have tried:
Print #1, Chr$(27)+Chr$(42)+Chr$(48)+Chr$(49)+Chr$(49)+Chr$(&B11111111)


I do not understand the nL and nH Parameter to print.

Does anyone have an example to print a line / dot in mmbasic?

Printing in Text mode works perfectly !

Best regards
Edited 2022-01-19 20:29 by Vampire05
 
flasherror
Senior Member

Joined: 07/01/2019
Location: United States
Posts: 159
Posted: 12:59pm 19 Jan 2022
Copy link to clipboard 
Print this post

  Vampire05 said  i want to print a single dot / line and i have tried:
Print #1, Chr$(27)+Chr$(42)+Chr$(48)+Chr$(49)+Chr$(49)+Chr$(&B11111111)



Shouldn't the Chr$(48) be Chr$(0) or Chr$(1) for single/double density? P29 says "Range for m =0,1,32,33". You are sending "ASCII 0" instead of 0.
Manual also says "If the value of m is out of the specified range, nL and nH the data following are processed as normal data."

What does the printer print when sent your data?
Edited 2022-01-19 23:04 by flasherror
 
Vampire05
Regular Member

Joined: 06/12/2020
Location: Germany
Posts: 88
Posted: 01:38pm 19 Jan 2022
Copy link to clipboard 
Print this post

 Thats it. Thank you very much flasherror!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9757
Posted: 04:42am 21 Jan 2022
Copy link to clipboard 
Print this post

These are lovely little printers and work well.

I changed the internal font from the Chinese extended characters, to "Code Page 437" to give me more standard ASCII graphics characters for drawing boxes etc.

There was a little programming utility you could get for these printers that allowed you to change the internal font and the default baud-rate.

I can't remember where I got that from now, or where I put it, so if you have that utility, please link or upload it here.
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025