PDA

View Full Version : Implementing a simple INT from stat to finish



MOUNTAIN747
- 13th March 2018, 17:12
So lets say a first time hobbyist, who has been playing with micro for six months, comes to the forum and wants to try an interrupt. First he or she looks over the entire BOOK of DT's Interrupts site, looks and the massive number of links in discussions about DT_INT's and thinks "Crap" this is too complicated.... and exit ... stage right.....
I think we need a MOST simple, STEP-by-STEP, example of setting up a 16f684, or f819, or even a 12f. This page should be located under HomePage, between DT Interrupts and Useful Links.

It would start by identifying what micro is being used. list all considerations before beginning. Just as if one of us were to approach a simple project and you were explaining each step to a twelve year old. Yea, I know, this time next year! Is it a worthy additions to THE BOOK?

lester
- 15th March 2018, 18:20
Is it a worthy additions to THE BOOK?

its an unequivocal yes from me.

mpgmike
- 15th March 2018, 23:53
Maybe the whole book concept needs redefined. Initially it was to be a depository, with filters, and with commentary, of DT's greatest contributions. Under that auspice we are doing exactly what we set out to do. What is being proposed now is an excellent idea, but not what we initially agreed to achieve.

Here is the trade-off; there is much work in making a book out of several forum posts. If that is our goal (initially stated as the intent), it would be up to the reader to filter through everything, read through the references, and do his/her homework. Assembling a "process" in the form of a book that starts the reader at ground zero and walks him/her through step-by-step progressions is a totally different approach.

A compromise might be an Example section with limited examples that may be copy/pasted with minor modifications. In my opinion, Daryl did lots of that with what has already been committed to the Book.

Just how far do we want to take this?

MOUNTAIN747
- 16th March 2018, 16:40
Mike, you are absolutely right. I proposed the repository to begin with and now I am considering altering the plan. My bad. I found myself digging in a great number of post's on some particular INT that made the whole process seem more and more complex. I realized the majority of our forum members and guest, and that especially includes me, could not implement some of these INT's without a mouth of research and investigation. It would be nice if every INT had a good example but that doesn't seem possible as I can't find an example of many INT's. I'm sure that at some point Darrel just started going through the datasheets and wrote the INT with no intention of using it but to make it available for others to use if needed. I think at some point a step-by-step project example needs to be done. However, it should not be a part of Darrel's BOOK.

tumbleweed
- 17th March 2018, 00:13
It would be nice if every INT had a good example but that doesn't seem possible as I can't find an example of many INT'sThe mechanics of interrupts are basically the same for all of them, with a few minor exceptions..

It sounds like you're talking more about how to use all of the various peripherals. That's a tall order.
My suggestion is to keep in mind that for most applications interrupts aren't worth the bother... they just
complicate things and make your code larger and slower.

Keep interrupts for what they're most useful for... things that must happen at a defined interval (ie a timer), scanning a display, or USART receive. Triggering an ADC to read and then waiting for an interrupt to read the data is likely a waste of time and energy.

lester
- 17th March 2018, 04:35
A compromise might be an Example section with limited examples that may be copy/pasted with minor modifications. In my opinion, Daryl did lots of that with what has already been committed to the Book.

Just how far do we want to take this?

At this stage, until you see significant interest from users, ( via discussion on the forum ) why not produce your "primer" or whatever and link to it from the code examples section.

IF ever there was significant interest, its easy to spin up ints.picbasic.co.uk or whatever and create a dedicated and detailed resource to 'teach' a beginner how to setup and use interrupts from scratch on a modern day device.

Having said that, the "book" as it stands is really very web based., I could install and extension that , if implemented would allow the viewer to print the site in a true book format. Such that you could use the resource as a collaborative desktop publishing system, to generate publishing-quality books, e-books and other documents from any collection of pages or all pages in the resource.

Why do we want to do this? Reading long documents on screen is still a poor substitute for reading the same content on paper. Word processor output is of higher quality than a printed web page, and the output of high end publishing software is better still. Using the resource as a collaborative publishing environment ensures consistency of published output, allowing authors to focus on content rather than being distracted by presentation matters.

if you wanted to take this further, i'm happy to provide the resources, but I think you'd need to gauge interest first.

mpgmike
- 17th March 2018, 15:38
We used to publish my books through CafePress.com. They no longer handle books. I'm in the process of porting my books to Amazon. Amazon has more stringent criteria for submitted books. I'm running into Amazon flags because of the DPI of the pictures I used, as an example.

With that said, it doesn't cost anything to list a book on Amazon. They offer Print on Demand for hard copies so there are, again, no upfront fees. They also have the eBook option where folks can download it. I would suggest if this is an attractive option, let's target later this year after getting constructive criticism from members. Surely there are little quirks missed by the contributors. With a little time, most of them can be found and fixed. Then the job of editing & compiling can produce a high quality product worthy of print.

Ioannis
- 19th March 2018, 20:23
If at the end we need a print format, I am willing to help as this is my second job. DTP for Publishing House (actually my brothers and mine).

Also the prices for print copies on-demand are dead low in Greece.

Consider just this (print and binder cost, not the pagination or cover art work): Pages/4 x .05 + 1 euros for a complete book (B/W internal and color laminated cover).

So if we decide to go that way, count me in. I am afraid though that interest is not much.

Initial idea for complete examples of Interrupts is great and in my opinion can be stored in the Cookbook as well.

Ioannis

lester
- 19th March 2018, 22:00
Consider just this (print and binder cost, not the pagination or cover art work): Pages/4 x .05 + 1 euros for a complete book (B/W internal and color laminated cover).

80/4 = 20

x .05 = 1

+ 1 Eu

= 2Eu Per 80 page Book with colour cover ( what type of binding?)

is that correct? for how many booklets would that be?

Ioannis
- 20th March 2018, 08:05
Binding only with glue.

Starting from ... 1!

Keep in mind that no other cost is calculated (page layout, cover design, any image processing etc).

This is the net cost for printing and binding plus everything else. Usually the total cost is increased by about 150 euros for the cover design, another 20-40 euros per 16 pages (depends on the material, text, maths, pictures etc) and a profit margin of 30% plus any taxes.

But for the forum I can help and manage to have only the printing cost. I don't know how much will be the shipping cost. From Greece it is a bit expensive. Maybe an account from your side could help.

Ioannis

lester
- 21st March 2018, 05:07
well, thats interesting. Prices for production have really dropped . I guess you might recall that Crownhill used to publish some books - like the excellent 'Experimenting with PICBASIC Pro' and similar. They were all perfect bound with colour front and rear and colour on some graphics inside. So i can see that current production costs are way lower than they used to be. Very interesting.

Ioannis
- 21st March 2018, 08:00
My town has a really hard competition. Athens is more expensive and rest of Europe too expensive either in print-on-demand or Offset.

Usually for a 1 copy of an A4 page you pay 0,03 euro and some do even 0,025 for more copies...!

That of course for a photocopy quality, not Print quality.

Ioannis