Cape Town South Africa
Online
Edison Member
Karma: 17
Posts: 1123
A newbie with loads of posts, and still so much to learn !
|
 |
« on: July 06, 2012, 11:51:59 am » |
The more I find out the less I know :-(
I have got my Posiflex 6800 Serial thermal printer running now, using the scraps of information that I can understand from the manufacturer, Ladyada, Sparkfun, and some ESC/POS info from Epsom, and a few postings on our forum. ( thanks ) I have learnt a hell of a lot, but realise theres a long way to go, and I dont have any spare time at all to learn.
So, now I can print the important text - bigger/smaller/inverted/ justified etc. - but now I need some help to get a logo ( 15k .cpp file ) that I generated as per the instructions on the ladyada mini thermal tutorial , into the eeprom of the printer - unless I make it much smaller and try to save it in the 328 eeprom?
When I tried to run the ladyada sample, ( I had made a seperate tab , and saved the file there as suggested , but when I try to run my sketch, it says progmem has not been defined , so I tried including #include <avr/pgmspace.h> but still no luck.
I have a feeling I am trying all sorts of bits from different libraries, that are not working.
Can anyone give me a clue ? I can't seem to find how much memory the printer has now for NVM users memory, I can delete the barcode bitmaps there - I dont need them now.
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
Cape Town South Africa
Online
Edison Member
Karma: 17
Posts: 1123
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #1 on: July 07, 2012, 01:32:29 am » |
I tried running the Adafruit thermal printer test, with their own logo, it works until it gets to the logos then it churns out about 100mm ( 4 " ) of garbage symbols and blanks..
I have loaded my logo into the printers nvmemory using the PC, but I cant find any details of how to print from the nvm.
The printer is supposed to be comapatable with the T88 commands, but the best manual for that I could find is written for windows codes or something, nothing like the Arduino I know a bit of.
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 35
Posts: 3650
@ssh0le
|
 |
« Reply #2 on: July 07, 2012, 02:25:11 am » |
and why doesnt the 15k image fit on the 32k program space of the AVR?
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Cape Town South Africa
Online
Edison Member
Karma: 17
Posts: 1123
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #3 on: July 07, 2012, 02:58:57 am » |
That was what I was trying at first, but the only example I could find was the adafruit sketch, where they suggest storing the bimap on a seperate tab, as logoname.cpp, and changing its type to :- static unsigned char_attribute_((progmem))logoname but it will not compile as progmem has not been declared.
I copied the cpp into the libraries in case ( I tried the Thermal, Adafruit-thermal, and the Adafruitthermal libraries )
I have tried several things, and eventually thought it might be easier to have the logo in the printers memory to call up when needed, but its also not easy....
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
New Jersey
Offline
Edison Member
Karma: 26
Posts: 2455
|
 |
« Reply #4 on: July 07, 2012, 06:34:27 am » |
Try putting the bitmap into your primary tab instead. If that fails, post your code.
|
|
|
|
|
Logged
|
|
|
|
|
Cape Town South Africa
Online
Edison Member
Karma: 17
Posts: 1123
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #5 on: July 07, 2012, 07:05:37 am » |
Thanks Wildbill, I have a bitmap lookup array for the 7 segment LED displays, that I declare in the opening of the sketch, that looks like this :- const byte digitTable [10] = { B01110111, B00010100, B01101101, B00111101, B00011110, B00111011, B01111011, B00010101, B01111111,B00111111 } ; Do you think the logo should be similar? I have used the LCDassistant software to generate the cpp as recommended on the adafruit thermal printer tutorial. and it is basically just a comma seperated load of bytes, " radiant" is the name of the logo :- const unsigned char radiant [] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7C, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x7E, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0xF8, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, etc. And then I have to find the way to call up the array to feed to the printer..... This is all abit new ( and interesting to me )
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
New Jersey
Offline
Edison Member
Karma: 26
Posts: 2455
|
 |
« Reply #6 on: July 07, 2012, 07:16:30 am » |
Given that that logo is 15K in size, it'll need to go in progmem: #include <avr/pgmspace.h>
const prog_uchar radiant [] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7C, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x7E, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0xF8, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
|
|
|
|
Logged
|
|
|
|
|
Cape Town South Africa
Online
Edison Member
Karma: 17
Posts: 1123
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #7 on: July 07, 2012, 08:04:28 am » |
OK I will give it a go
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
Cape Town South Africa
Online
Edison Member
Karma: 17
Posts: 1123
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #8 on: July 07, 2012, 06:19:06 pm » |
OK I have put that at the top, but with the ESC/POS method of calling it up is very confusing, I tried using the adafruit thermal library which is meant to make it easier, but it doesnt work with its own example, I just get gibberish when it comes to the barcodes or grahics ( the various text examples are fine )
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
Cape Town South Africa
Online
Edison Member
Karma: 17
Posts: 1123
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #9 on: July 26, 2012, 03:11:37 pm » |
Just in case someone else has this problem with a thermal printer with eeprom storage for logos , I found the ESC POS commands for printing the stored logo image ( the manufacturers couldn't help ! ) in decimal it is :-
thermal.print( 28, BYTE); thermal.print( 112, BYTE); thermal.print( 1, BYTE); // number 1 image in eeprom thermal.print( 3, BYTE); // double width double height
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
|