CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

How to draw waveforms From ADC result in Printer by PIC Micr

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mvreddy_222



Joined: 12 Jan 2007
Posts: 5
Location: India

View user's profile Send private message Yahoo Messenger

How to draw waveforms From ADC result in Printer by PIC Micr
PostPosted: Fri Jan 12, 2007 12:25 am     Reply with quote


I want to draw the waveforms of stored ADC result which is acuired from ADC channel,and I need to print that waveforms through printer without the interpretation of PC,could any one give me idea.
thank you in advance.
mfer



Joined: 11 Jan 2007
Posts: 8

View user's profile Send private message

my ideas about your task
PostPosted: Fri Jan 12, 2007 12:52 am     Reply with quote

Hello,

If I were you, I would consider applying thermal receipt printers.

-Can be driven via serial port or USB - means direct connection to PIC.

-Can be used in both graphical and text mode - means you can draw anything, and can print text for reports.

-Fast printing - depending on sampling speed and serial port speed you may do realtime drawing.

-Cheap paper, no consumables.

I used Epson and Star printers so far. Possible types I vould consider: OEM-like solution: Epson EU-T532 bare printer mechanics with or without driver card, user-friendlier solution: Star TSP100 or maybe 700.

Regards,
mfer
mvreddy_222



Joined: 12 Jan 2007
Posts: 5
Location: India

View user's profile Send private message Yahoo Messenger

PostPosted: Fri Jan 12, 2007 2:13 am     Reply with quote

thank u for your reply.
Actually I need a genereal idea how to draw waveforms .
I will take care of Printer.I want to use PARALLEL PRINTER(HP)/DOT MATRIX PRINTER.I have already tested with text messages.I have succeded,now I want to print waveforms,
plz give me idea.
mfer



Joined: 11 Jan 2007
Posts: 8

View user's profile Send private message

i don't know that protocol
PostPosted: Fri Jan 12, 2007 2:27 am     Reply with quote

hello,

Unfortunately, I don't know the driving protocol for parallel matrix printers, but I'm sure you can find it somewhere on the net.

mfer
Ttelmah
Guest







PostPosted: Fri Jan 12, 2007 4:04 am     Reply with quote

Others have given the edge of the answer. The 'core' is a series of things:
1) There is no standard. Every printer 'language' is different. However HP, and Epson, both have their own languages supported by 90% of their models - this does not give access to the latter features, but gives as 'core' access mode supported by most models.
2) This is completely down to _you_. I did this some years ago, for a number of printers. I used an external 256KB RAM, parallel interfaced to the processor, and 'drew' the image required into this (required first a dot algorithm, and then bressenhams line drawing algorithm using this, to draw the waveshape, and text round this). The final 'drawing, was then sent to the printer, using the printers command language - I used PS/2 , which is the basic language spoken by most Epson printers, and HPGL, the equivalent for HP printers. Now this took about 1000 hours of programming, and at the time was worth doing, because this was for an application with tens of thousands of sales. For anything smaller, you are going to find it much quicker, and cheaper, to use a graphic language, on something like Linux, with a lot more power than a PIC possesses. Graphics are hard work, and rasterising, needs a lot of RAM...
3) One of the earlier posters, has started to point you towards exactly this. Small size is your friend, and it is well worth paying for a relatively expensive 'small' printer, that is easy to drive, since the actual programming to drive printers, is a large amount of work. Worse, if you look at the cheapest printers, these actually do not support any 'language' at all, but require the entire image to be rasterised inside the computer. This is why cheap printers, often have the largest drivers. If you look at typical modern printers, the core 'driver', is often hundreds of kilobytes in size, and uses a few megabyte of RAM to perform the image rasterising. Some sets for HP models are over 30MB in size (but fortunately, a lot of this is 'frilly bits'...).
4) The easiest printer language to drive, is 'Postscript'. This is a complete graphics language. This though is only supported by relatively expensive printer models, does help a lot, but still a lot of work.
5) Unless you are lucky, and the incoming data format, just happens to match what the printer needs, you are going to also need to perform operations like rotation, and scaling on the 'picture', and these needs yet more RAM, and processing power.
In the past, the easiest solution, was to use a _plotter_ rather than a printer. The reason is that no raster conversion is then needed, and you can just send a command to move the 'pen' to the required location, lower it, and draw a line. Possibly about 1/100th the work otherwise needed. HP, do an inkjet printer, which internally contains the hardware to emulate a plotter, and Hitachi, do a number of waveform plotters. If this is for a 'on off', a second hand plotter, will be vastly easier.

You have bitten off a much bigger problem than you may think, trying to do this...

Best Wishes
mvreddy_222



Joined: 12 Jan 2007
Posts: 5
Location: India

View user's profile Send private message Yahoo Messenger

PostPosted: Fri Jan 12, 2007 11:52 pm     Reply with quote

thank you for your suggestions.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group