PDA

View Full Version : The last Fourth Wish



hardcore
- 18th March 2010, 14:44
Hi All,
Here is disagreement between advantages and disadvantages of using PIC
for your project that you can find right now on market.
For any single project not possible to find a PIC that fits 100%
any project specification.
My Fourth wish is a special software that able to create from
designed software, numbers of input/output pins- analog and digital,
working frequency and specification - layouts for custom
PIC manufacturing process.
You design software and hardware parameters and get custom PIC that
fits yours task.Then you send to company layouts and get back what really you need.
Sometimes you need only one analog input, 3digital inputs, 3 digital outputs,
1 high speed ADC – so you will get what you want and forget about misbehaved
unused hardware components in standard PIC.
In this case designing software will become absolute by one single standard for
specific frequency ranges and numbers of pins.
Best Regards to All


:cool:

rmteo
- 18th March 2010, 14:56
Look into the cost of having a custom ASIC designed just for you - several hundred thousand to several million dollars.

Seriously, a more reasonable way to do it is to use an FPGA. But if you find PBP difficult, then an FPGA will be several orders of magnitude worse.

tenaja
- 18th March 2010, 15:11
Actually, the PSOC does just that. You get x number of analog and y number of digital blocks, and you get to allocate them as you see fit. Seems like a real neat feature to me.

The biggest reason I didn't investigate further is those chips cost as much as an expensive pic. I guess I'd rather use a more affordable device that is designed to do the job rather than an expensive one-size-fits-all that has no other benefits.

Melanie
- 18th March 2010, 17:49
> For any single project not possible to find a PIC that fits 100% any project specification.

Actually, over the years I have completed hundreds of projects where the PIC fits just perfectly.

> My Fourth wish is a special software that able to create from designed software, numbers of input/output pins- analog and digital, working frequency and specification - layouts for custom PIC manufacturing process.

Here PICBasic (PICBasicPro) seems to work... not only for me but for most people this forum. Learn to use it properly and you will find it works quite well for you too.

You design software and hardware parameters and get custom PIC that fits yours task. Then you send to company layouts and get back what really you need.

This is what happens already (for example with PCB manufacturing). Likewise this is what happens in the realm of consulting. You tell them what you want, how it needs to work, what it's supposed to look like, and (after you pay over a pile of money), you get back what you wanted.

Sometimes you need only one analog input, 3digital inputs, 3 digital outputs, 1 high speed ADC – so you will get what you want and forget about misbehaved unused hardware components in standard PIC.

It DOESN'T misbehave. Misbehaviour is due on your part forgetting the rules of design.

People who DON'T KNOW how, always wish that life was easier. You walk over to your Star-Trek replicator and speak your desires into the machine... a few moments later you open the door and miraculously it has been produced for you.

People that KNOW have an advantage over people that don't. But it doesn't have to be that way. Here, FREE OF CHARGE, I reveal to you the secret of your personal advancement... EDUCATION! This is the KEY. It unlocks closed doors. It stops you WISHING and starts you DOING, because you now have the KNOWLEDGE to make things happen.

Personally, I'd rather the whole world remained UNEDUCATED. Because then they'll continue to pay me large amounts of money to do things they could do for themselves - if only they knew how! *smiles*

Remember the secret (to all your wishes) is... EDUCATION. But let's just keep it a secret between us.

mackrackit
- 18th March 2010, 17:56
I am glad that this is the last wish... :D

mtripoli
- 18th March 2010, 21:42
I FOUND EXACTLY WHAT YOU ARE LOOKING FOR!

Thank me later...
http://en.wikipedia.org/wiki/Intel_4004

:eek::eek::eek:

And some memory to go with it (no, I will not help with interfacing)...
http://www.decadecounter.com/vta/pdf2/7110.pdf

Bruce
- 18th March 2010, 22:02
AWESOME. Thanks for the links. But, don't those all come with manuals & junk like that that we have to read first?
And does the memory chip write the code for me?

mtripoli
- 19th March 2010, 03:29
You're right of course! We do have to read stuff and manuals and manuals and stuff :mad:

Here's the data sheet:
http://download.intel.com/museum/archives/pdf/4004_datasheet.pdf

And the manual:
http://download.intel.com/museum/archives/pdf/msc4.pdf

I can probably draw a schematic or something for the power supply: both +5 and -10V needed!

Maybe this guy:http://webpages.charter.net/bkotaska/mcs4_micro.htm#background will give us the schematic. And PCB layout. And code. And custom "example" code. And answer every question. About every command. Pleeeezzzeee nnnneeeedd heeeeeelpp noooowww...

Oh yeah... http://www.intel.com/museum/archives/4004ip.htm


You have to check out the images of the IC mask. THEY'RE DONE WITH KNIFE CUT RUBYLITH TAPE ON ACETATE!


Gotta' stop... I'm laughing out loud now and people look at you funny when you do that...

mackrackit
- 19th March 2010, 04:23
hardcore,
We are just having a little fun. Do not take it personally.

The point every one is trying to make is, if you want to work with hardware(MCUs) you will have to do a lot of reading and testing what you have learned.

Yes, there are many systems that use a UI (Rockwell Ladder Logic) but with those type of systems you are not reall working on the hardware level. You are working with pr-made modules that can do basically one thing. Want to do something else, buy another module.
That type of system has it's place but can be very limiting. They can use a UI because the hardware is pre-wired. Like I said, they have a place and are use often where the person setting up the system is not a programmer or does not know much about hardware.

So if you want to play with programmable hardware you will have to read read and read some more. Then blow a few things up along the way to find out what you did not understand.

See my signature :D

Melanie
- 19th March 2010, 07:16
When I was in University, I was a fanatical reader... the Librarian hated me, must have dusted off books for me that hadn't ever seen the light of day... I recall casually reading a computing history book (or a very old issue of an Electronics magazine) about someone back in the early 1980's that wanted to write a program that could write programs directly for End-Users... for those that couldn't do the technical stuff for themselves. Can't remember his name, or the name of his project or venture, so obviously if failed... all I do remember was a picture of him holding an Osborne 'portable' computer (well it WAS bound to fail if that was his platform!!!!) so that might have made him an Englishman. Actually wasn't Osborne American? So hardcore's wish is not new - somebody already had it a generation or two earlier. Actually some of the best advances in computing started with a wish (like the desire to take a fixed-task machine and make it more versatile by making it programmable). This might be the application of reverse logic (taking a versatile broad-application device, and making it narrow single-application).

hardcore
- 19th March 2010, 14:27
Hi All,
I really am having fun to read yours messages.
I agree with you that nothing under Moon so every thought we generate may be was in head of a person or dreamer living two century ago or in B.C.
It is all about our tricky brain.
For example thousand of thousands of talanted scientists, researches and engineers
living in all human history before ~1905 never wrote e=Mc^2 and only one did.
To be serious I am still looking in science news and clearly see that time is coming when custom designed complex IC will be simply printed or it will be able to ordered on internet by hobbyists or professionals for much less price we need to pay today.
For my point of view sometimes each person has to ask in what time frame
from now he is able to be in business that he manage now.
For example if a person working right now in electronic repair business and think he will continue to work in the same business next 10 years – big mistake.
Electronic repair business is dying right now.
So my Fourth wish is not dreaming fantasy it will be soon.
Best wishes to All
:)

mackrackit
- 19th March 2010, 14:35
The best way to make something happen is to do it yourself.

So stop wishing and start studying. Then you will be the one to make it happen.

But at some point there still has to be people that know how to do things, not everyone can have point and click. The base code still has to be written and the hardware understood.

hardcore
- 19th March 2010, 23:04
Hi mackrackit,
Thank you for encouraging me to move in right direction.
When will done my project will start posting parts of code.
Appreciate any help in future.
After e-mailing start feeling that is possible.
Best Regards to All:cool:

mackrackit
- 20th March 2010, 01:06
Just curious... What program do you plan to use to write the UI?
I would suggest something cross-platform.

hardcore
- 22nd March 2010, 02:34
Hi All,
It is not right time to design UI right now when PICs become more complex, all different, and technology rapidly have a lot of changes.
Final destination for nearest years will be 24-36 bit PICs with 28-40 pins, having implemented serial optical interface, wireless ports, and other option.
This will be done in nearest time, we are before next technological revolution
So right now we only can discuss future implementation inherited in next generation of PICs.
It will be great if we can start speaking on this forum OUR Future Expectation in PIC hardware and software development.
So our discussion will help to create tomorrow PIC world.
About doubt to use PIC to make bad things I think bad people can simply put suicide virgins on the top of bomb to make them flying to final destination.
No big brain needed for brainwashed people.
So our united thoughts can change tomorrow way of thinking.
Best Regards:)

Melanie
- 22nd March 2010, 08:32
It is a little pointless discussing the intricasies of products that don't (and may never) exist, or speculating what may or may not happen. Simply because if it never happens, you have wasted your time in a pipe-dream. This must be the internet equivallent of sitting round a table with your buddies and a beer at the end of the day and putting the world to rights - only without the beer and social contact!

There is nothing stopping YOU changing the world - Engineers are doing just that every day. Civilisation is built by Engineers. Engineers are action people - they don't sit around wishing for things to happen - they go and make them happen.

Which one are you? Are you going to sit and day-dream, or are you going to be an Engineer and turn dreams into reality?

hardcore
- 23rd March 2010, 12:57
Hi All,
Never smoke a pipe-dream.Thank you for refreshing memory.
In 1980 I saw presentation of high resolution imaging 128 bits computer
where 32 4bits processors works in parallel and supported by high speed and big capacity RAM.
If we return to our PICs and make them able to work with high speed data storage and using them in parallel structure – yeah you are right we do not needs in any changes in present manufacturing product for now.
I agree with you that my discussion is pointless but it is only wish and nothing personal.
Best Regards;)

comwarrior
- 5th May 2010, 11:58
When I was in University, I was a fanatical reader... the Librarian hated me, must have dusted off books for me that hadn't ever seen the light of day... I recall casually reading a computing history book (or a very old issue of an Electronics magazine) about someone back in the early 1980's that wanted to write a program that could write programs directly for End-Users... for those that couldn't do the technical stuff for themselves. Can't remember his name, or the name of his project or venture, so obviously if failed... all I do remember was a picture of him holding an Osborne 'portable' computer (well it WAS bound to fail if that was his platform!!!!) so that might have made him an Englishman. Actually wasn't Osborne American? So hardcore's wish is not new - somebody already had it a generation or two earlier. Actually some of the best advances in computing started with a wish (like the desire to take a fixed-task machine and make it more versatile by making it programmable). This might be the application of reverse logic (taking a versatile broad-application device, and making it narrow single-application).

Mell, I've read the same article and more on Osborne besides...
If you read the history on computers then a lot of what we are doing today is not new... Just regurgitated and made easy for joe public to do...

hardcore
- 6th May 2010, 15:52
Hi All,
So I am enjoying playing with PIC16F84A,PIC16F628, and PIC16F88.
They works perfect but all of them have disadvantage such as they can do only one operation in specific period of time.
For example: if PIC produces impulses with specific frequency it is not possible to send variable value to LCD without loosing control in generating frequency.
More troubles comes when PIC require to works with one or two feedback and that require to increase PIC frequency to be fit in-process.
That move has limitation.
For me big step forward will be developing one circuit with two core microprocessors such as P PIC16F628 or PIC16F88 having few bridges between their registers that keep variables of process.Simple logic circuit between two processors will perform next task:
IF var1(in-process first PIC) < or > var2(out-of process second PIC) THEN
var1=var2.
It will speed up any applications where using feedback is priority without interrupting process.
Each PIC has own program and programmed individually.
Using one OSC helps to synchronize cycles of both of them.
Here is example:
PIC1 produce impulses with pre:cool:programmed frequency written in var1.
PIC2 read one or two feedback such as current or voltage value, timing and
by process requirements put needed value in var2.
By action var1 = var2 so PIC1 increase or decrease frequency without using interrupt.
Osborne architecture is cornerstone for processors but is not absolute.
I would prefer to use PICs with two core processors described above than traditional PICs manufactured by MICROCHIP.
Best Regards to All

rmteo
- 6th May 2010, 16:14
It is possible to do what you are described (and much more) with a single PIC.

hardcore
- 6th May 2010, 19:03
Hi All,
I agree with you that 60% or more could be fit for using single PIC.
Real applications require more than one PIC by my point of view.
For example: Inductive heating require frequencies from 200 up to 500 KHz.
The first task is generating starting frequency 200 KHz.
Second one is increasing frequency up to resonance point slowly it mean that find
minimum current point and keep it near minimum.
Due to nature of metals that is changing its parameters resonance point will be moving
so increasing or decreasing frequency.
Third task is to send to LCD data about heating – temperature, frequency.
Fourth task is generate heat for specific period of time after temperature in
metal equal needed.
Fifth task is keeping cooling water flow and stop heating if water is not in system
(broken hose).
Sixth task is giving signal to robot to take detail off and put new one.
Seventh task is status of process indication by LED and sound.
So as you see it is not possible to use single PIC for these applications.
Process of heating has to be continuous without interruption otherwise
PIC will loose resonance point.
Before resonance point here is high current.
After passing resonance point current is increasing.
Resonance only has low current.
I can write examples of many applications that require 2 PICs not one.
Best Regards to All
:rolleyes:

rmteo
- 6th May 2010, 19:09
Sure, you can do all that with single PIC (and even much more), if you know how. I wouldn't use the ones you mentioned though.

hardcore
- 7th May 2010, 16:57
Hi All,
I am still learning to keep my brain from drying and I will appreciate any tips or tricks
to show me how to work in right way.:rolleyes:
In early eighty I already learned processor architecture and had learning experience
How to write program in binary that processor understand (just BIOS).
I did not use this knowledge in my working experience.
Right now PIC for me is just a nail and PICBASIC PRO is just a hummer.
So using both of them I able to put together hardware and technology.
Doing this in easy way I am pretty sure that double core PIC has
advantage than using single advanced and expensive PIC for multitasking program
Especially if you are not a ghost living in microprocessor and manually turn on or off
bits in registers.
In my example I am not agree that to generate frequency and find minimum can be done
by using one comparator:
OSC 20 MHz
NUM var WORD
DELTA var WORD
CMCON=%00000101 ‘ set
DELTA = 2500
Run:
PORTB.0 =%00000001
CALL WAITA
IF CMCON=%10000101 Then Delta = DELTA -1‘ if digital more than reference
PORTB.0 =%00000000
CALL WAITA
GOTO RUN
WAITA:
FOR NUM = 0 TO DELTA
@ useless statement
NEXT NUM
OR write statements in assembler or better in binary code
For frequency 200KHz period on is equal 2.5uSec and off 2.5uSec.
For right heating condition needs to be in 10Hz range so 200000+10 = 200010KHz
It is means steps on is equal 1.5nSec and off 1.5nSec.
So variable NUM has step 1.5nSec and max value is equal 3333
For 500KHz you can calculate more strange numbers.
How is it possible to send SEROUT message that last 2mSec when microprocessor
Is Working on generating frequency and time needed for one operation is 200nSec?
My guess that your expertise ends here because using one PIC cannot do this task
Any comments?
Best Regards to ALL

rmteo
- 7th May 2010, 17:53
How is it possible to send SEROUT message that last 2mSec when microprocessor Is Working on generating frequency and time needed for one operation is 200nSec?
My guess that your expertise ends here because using one PIC cannot do this task
Any comments?
Keep guessing :cool::cool::cool:

Having a 200KHz (or 500KHz) signal and sending a out a message is easily possible - just not the way you are doing it.

HenrikOlsson
- 7th May 2010, 18:37
Hi hardcore,
The key is to use the PIC's built in peripheral modules. Most "modern" PICs have at least one CCP module (Capture Compare PWM module) that, in conjunction with one of the PIC's hardware timers can be set up to generate any frequency and duty cycle you want (within limits depending on oscillator speed etc). The PBP command HWPM uses the CCP module to do this but it has it's limitations which you can get around by writing the registers manually.

Let's see, a 16F628 running at 20Mhz....(this is untested but try it out, read the datasheet section on CPP module and TMR2 in this case)

DEFINE OSC 20
TRISB.3 = 0 'Set CCP pin to output.

CCP1CON = %00001100 'CCP module in PWM mode
PR2 = 9 '~500kHz
TMR2L = 20 '~50% duty cycle at 500kHz
T2CON = %00000100 'TMR2 ON, prescaler 1:1

Main:
'Do whatever.
Goto Main


Another very common peripheral is the USART (16F628 has one) which can be used to send data out over a serial line, it is also hardware so you set it up for the baudrate you want (or let PBP so it for you) and then just write a character to it and IT will send it out - no need to bit-bang it out with SEROUT. The PBP command HSEROUT for example uses the hardware USART to send data.

There are several other hardware periphelals bulit in to most PICs that you have to master and take advantage of. Think of it, it's only the last couple of years that the CPU's used in modern PC's have gone "multi-core" yet they've been able to get them doing quite a bit of work "in parallel" by using IT'S hardware peripherals and clever time-slicing and other multitasking tricks.

If you REALLY think you need "multi-core" then take a look at Parallax Propeller chip, it has 8 CPUs with shared RAM and some pretty cool things can be done with it. (Never tried one myself though).

/Henrik.

hardcore
- 13th May 2010, 20:33
Dear Henrik,
Always when we speak about feedback than best solution is analog schematics.
Unfortunately, especially when needs to generate frequency in SWEEP MODE.
Start at 200KHz and go up with 10 Hz step until schematics find optimum.
When optimum frequency is found then needs continuously adjust frequency by monitoring voltage
on serial/parallel resonance output LC module and keep it close to zero.
Using traditional PIC architecture does not allow to do that.
So idea about dual core PIC with bridges between registers keeping variables is advance move in right direction.
Few words about USART. I read all literature and could not found how assigned
PORTB.Pin can send periodically variable values to serial LCD without involving
CPU resources for example 4 times per Sec.
About Propeller Chip: It is really good for gathering information, scaling data, and
sending data to storage.For me 8 CPU is too much and will never be using in any hobby applications
except special industrial ones.Will be better if manufacturer:cool: design
this chip with 2-4 cores and inner bridges between registers.It will give more freedom.
Best Regards to All

HenrikOlsson
- 14th May 2010, 08:04
Hi,

I don't know enough info about your paritcular project to tell if it is doable with a PIC or not - maby it is, maby it isn't. You asked how it was possible to send a serial message lasting 2ms and have the PIC output 200kHz PWM signal at the same time. I showed you one possible way of doing that - by using the CCP module to generate the PWM and the USART to send the serial message. That way I'd guess 99% of the CPU time is still available.

Of course the CPU needs to be involved even when using the USART but the difference in amount of involvement compared to bitbanging a character is massive. Really, all the CPU needs to do is load the USART TX-register with the character to be sent, takes one maby two instruction cycles then it can continue doing other thing while the USART sends the character. When the USARTs transmit buffer is ready for another character it sets a flag which you can either poll or have generating an interrupt.

To send something periodically you use another one of the PICs hardware timers setup to generate an interrupt at a certain frequency. The interrupt service routine then either does the whole thing, sending the message (usually not a good aproach) or it simply initiates the sending by loading the first character into the USART TX-register and activating the TX-interrupt so that when the first character is sent you get another interrupt so you can load the next character etc etc. When the whole message is sent the you deactivate the TX-interrupt.

In my servo drive project I've been working on for long time the PIC counts step- and direction pulses at up to ~100kHz, reads an incremental encoder at up to 2.5MHz updating a 32bit position register, runs the PID loop at 1220Hz, drives the output bridge with a 20kHz PWM signal, sends and recieves serial messages at 115200baud AND blinks a LED - all at "the same time". It's not done magically with a single command, you have to make it happen.

/Henrik.

rmteo
- 14th May 2010, 15:10
As you and I have pointed out, doing multiple things at apparently the same time is easily possible - you have to make it happen. :cool:

The main issue that the OP has is that he wants to sweep a PWM output from 200KHz to 500KHz with 10Hz resolution/steps using the PIC.