Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > Propeller Chip > Book for absolute beginners. Propeller 101  Forum Quick Jump
 
New Topic Post Reply Printable Version
93 posts in this thread.
Viewing Page :
 1  2  3  4 
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 12/23/2008 5:05 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Here is program 10
Full schematics
Full -100 to +100 speed control of PMDC motor
All little odds and ends cleaned up

OBJs used have been improved and re attached here

Next we will modify this program so it runs the motor from a 5K potentiometer

Harprit

File Attachment :
LCDRoutines.spin   9KB (application/octet-stream)
This file has been downloaded 87 time(s).

File Attachment :
Utilities.spin   1KB (application/octet-stream)
This file has been downloaded 63 time(s).

File Attachment :
Program10.spin   21KB (application/octet-stream)
This file has been downloaded 79 time(s).
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 12/25/2008 2:54 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Here is program 11 with requested schematic
It runs a motor under the control of a potentiometer
-100 to +100% of power, continuous control.

There was an error in previous programs
It had to do with having a variable have more than one value within a COG
Since we don't know when a value will be read by other COGs this can cause
problems. Schematic did not show resistors for the LEDs. These have been
added.

All values for all variables to be read by other COGs must be unambiguous at
all times! Meaning: Set only once in the home COG, do not modify in any other
COG.

I will not fix previous programs but the error does not continue here.

The next program will start on creating pulses at specified intervals.
We will create a musical metronome. You will need a transistor and a small speaker
or Piezoelectric horn

HSS

Post Edited (Harprit) : 12/26/2008 5:34:01 PM GMT



File Attachment :
Program11.spin   20KB (application/octet-stream)
This file has been downloaded 90 time(s).
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 12/26/2008 2:21 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Here is program 12, the metronome

I did not work out extreme timing accuracy but you will get the idea.
You can improve on that if you like

If you don't have a speaker, you can speed things up about 100x and see
it all on an oscilloscope

The next skill we need is to generate frequencies so that is what we will do
Controlled by a potentiometer
Displayed on LCD and on an oscilloscope
No new parts will be needed

We are developing a nice set of skill now and can be thinking about reading
voltages next. We will build a thermometer. LM34DZ used.

Harprit

File Attachment :
Utilities.spin   1KB (application/octet-stream)
This file has been downloaded 43 time(s).

File Attachment :
Program12.spin   21KB (application/octet-stream)
This file has been downloaded 56 time(s).
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 12/27/2008 6:59 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Now that we have some of the skills we need to start working the the Propeller Chip
behind us. I need to know which direction we should move the programming and
the tutoring in.

Comments from both veterans and beginners are solicited. Comments from those
familiar with problems area in learning about parallel processing with the Propeller
would be especially useful.

I have about 60 pages done on the book. As it looks right now it will take between
200 and 250 pages.

Harprit
Back to Top
 

statemachine
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2005
Total Posts : 24
 
   Posted 12/28/2008 7:43 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
 A short debugging scenario should usually be included.
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 12/28/2008 10:05 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Ill see what I can do about adding some bugs that are both easy and hard to fix.

My problem is that I too am new to the Propeller so it can hard for me to see
the forest for the trees. I know a little bit about all this so I need your feed back.

Then again parallel processing techniques are new
to me too so I am eager to listen to those that have gone before me. Most of
you know a lot more than all this than I do so please do not hesitate to lead
me in the right direction.

Harprit
Back to Top
 

StefanL38
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 958
 
   Posted 12/29/2008 4:02 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Hello,

there are different aspects of parallel processing.

trying to divide a big job into smaller pieces and work parallel on them
to speed up the processing - no idea of how to do that.

Avoiding conflicts through accesses to variables at the same time
or mixing up IO-signals could be a theme

the basic thing might be to dedicate a cog to something timecritical
or randomly happening events that have to be recognized

or things that have to be updated fast and regurlarly
like scanning a matrix-wired keyboard
or updating an LED-matrix or more than one 7segment-displays by multiplexing them

code-examples for comparing "spaghetti-code" with well structured code showing the advanteges of well structured code

Developing philosophies:

My style of developing is to divide the code in small methods each method doing ONE thing.
And testing new methods in its own test-sourcecode before adding it to a complex sourcecode

Some execises with code-examples that show the advantage of this coding-style

Code-examples with small bugs causing problems that come up to the surface as strange behaviour
or at complete different points than they are coded (Method "A" has a bug which causes problems
in method "B" and with whih debug-methods you will find them quickly

other ideas:

software-debouncing of mechanical buttons and evaluating the limits of this method

software schmidt-triggering of analog signals and evaluating the limits of this method

software-comparator with hysteresis of analog signals and evaluating the limits of this method

low-high / high-low-transition-detecting methods


hardware-ideas:

IO-extension using shiftregisters

stepper-motor-driver

PLC-IO-picture-updater, PLC-IO-processing

creating a input-output-driver for more than one IO-Pin which is just using ONE cog
with functions like:
wait for input to go high-low with a timeout and if timeout occurs set a flag-variable
that the main-program can on the flag
make IO-Pins "blink" parameters blink-time, frequency

propeller-controlled accumulator discharge / charge with capacity measuring

cogs working as an oscilloscope or voltagemeter
other cogs as DACs driving a transistors-base and alltogether showing
the behavior of a transistor as measured voltages and currents displayed as numbers
next to a transistor symbol or other electronic components

maybe the tricks and trap document

forums.parallax.com/forums/default.aspx?f=25&m=114128

could give themes with showing cases where the trap closes and
code-examples how to avoid those traps

best regards

Stefan
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 1/5/2009 10:49 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Sorry for the dead time folks
I had some business that needed all my time to finish up
Its done, I'll have the next program on line in the next few days
Thanks you for your patience

HSS
Back to Top
 

sam_sam_sam
Soldering Junkie



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined May 2005
Total Posts : 1304
 
   Posted 1/11/2009 10:51 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
 Harprit
 
Keep up the good work    smile


  Thanks for any idea that you may have and all of your time finding them
 
 
 
 
Sam

Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 1/12/2009 7:51 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Here is the next program
Reads a voltage into a Propeller

Thank you for the encouragement Sam

HSS
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 1/12/2009 8:05 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Sorry, here is the program.
Harprit

File Attachment :
Program14.spin   20KB (application/octet-stream)
This file has been downloaded 88 time(s).
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 2/17/2009 11:53 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
I have had a query about problems with using a 4 line display with a propeller
I do not have access to this display and so cannot provide specific help
Can some one else help on this display

Harprit.
Back to Top
 

bboy8012
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 133
 
   Posted 2/18/2009 3:23 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
I think another aspect to cover for beginners (which I am one) is industrial control loops. Creating, making failsafe, and optimizating, as well as eliminating errors.


 

Back to Top
 

Paul
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 164
 
   Posted 2/19/2009 4:50 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Harprit- I was looking for some code to read 60HZ and here was your code, Program14, right on the first page of the forum. Good work. I had to change the waitpeq to use |<20 because %100000000000000000000 looks funny in code. Thanks for your efforts. I've not used this form of COGNEW before.

Paul


Propeller Wiki Rocks! - propeller.wikispaces.com

Post Edited (Paul) : 2/19/2009 1:03:54 PM GMT

Back to Top
 

Will Eyeam
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2009
Total Posts : 16
 
   Posted 2/20/2009 12:08 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Can you make a stepper motor driver using a simple uln2003 darlington array
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 2/20/2009 2:23 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Yes but it depends on a lot of other things too. like size of motor and how the array is used.
My book "Running motors with PIC microprocessors" covers a lot of the tricks of the trade for beginners.
Send me a private message if you want one.

HSS
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 2/20/2009 2:48 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Though I have not posted a lot lately, I have been busy on the project
Here is a preliminary table of contents for the book as it now sits.
Its not set in concrete as yet.
I welcome suggestions from beginners as regards additions and omissions.
The book is a "learn by doing" effort as are all my books because I believe in
learning by doing and not getting too theoretical (for beginners that is).

Proposed Table of contents

Part 1. Understanding the system
Section 00 Preface
Section 01 Introduction to the Propeller Chip
Section 02 Understanding the Propeller Chip
Section 03 The Hardware and Software Set Up
Section 04 Writing programs, the Propeller tool
Section 05 The shared memory
Section 06 The eight cogs
Section 07 Understanding one Cog in detail
Section 08 The SPIN language
Section 09 Special terms used in the software
Section 10 The concept of shared memory
Section 11 The use of flags
Section 12 Why parallel processing and when is it better
Section 13 Tasks which lend them selves to parallel processing

Part 2. Learning by doing. The Projects
Section 14 Reading inputs into the system
Section 15 Controlling outputs out of the system
Section 16 Using Liquid Crystal Displays
Section 17 Using LCD displays with a dedicated cog
Section 18 Using a computer terminal
Section 19 Motor Amplifiers
Section 20 Running hobby, R/C servo motors
Section 21 Running a R/C servo motor a shared task
Section 22 Running small DC motors
Section 23 Running motors, a preliminary discussion
Section 24 Running a DC motor with multiple cogs
Section 25 Running DC motors with quadrature encoders
Section 25 Running a motor with an attached encoder with multiple cogs
Section 27 Running bipolar stepper motors
Section 16 Creating Timers and Counters
Section 28 Managing Memory
Section 29 Communicating with computers
Section 30 Making a single set point controller
Section 31 Debugging

Part 3 The appendices
Appendix Sources of materials
Parallel processing terms and ideas
Epilogue

Publishing details
Approximately 200 to 300 pages
Approximately 2000 to 3000 lines of code
Approximately 100 to 150 circuit diagrams and pictures
Detailed introduction the Propeller Chip, a first in affordable parallel processing.

My casual resume
I am not an academic though I did do all my coursework for a PhD in
Ceramics (Materials). I am a hands on engineer. I started and ran
Rhino Robots Inc for 20 years. We built and sold robots and CNC
machines. I understand how to connect computers to the real world
and do useful work with them by using sensors, motors and other
hardware.
Back to Top
 

Bob Lawrence (VE1RLL)
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2007
Total Posts : 420
 
   Posted 2/20/2009 12:40 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
@Harprit

Great idea! I really liked the way you comment your code. I look forward to purchasing a copy when it's all done. jumpin

How about some basic filters, low pass, band pass, high pass?


Aka: CosmicBob

Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 2/20/2009 4:31 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
COSMIC:

Thanks for the comments.
I'm afraid filters will have to wait for a more advanced text. This one is for beginners.
However I will keep your suggestions in mind.

Thanks
HSS
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 2/20/2009 4:34 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
bboy:

I think industrial controls might be a bit past this book for beginners.
Maybe in the next book

Thanks for your post
HSS

Post Edited (Harprit) : 2/21/2009 12:41:18 AM GMT

Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 2/20/2009 4:41 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
On the 4 line display I think the problem might be a lack of power from the Propeller.
Make sure the display is getting full 5 volts
Make sure the signals from the Propeller go through buffers to get them to 5 volts equivalents.
If this does not fix it, please let us know again

HSS
Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 8/11/2009 6:26 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Here is the latest update on the beginners book I have been working on
Accepted by publisher
McGraw Hill will publishing it
I will have finished verbiage turned in to them by Oct 31 this year, latest.
It should be out early next year
Thanks to all for all the feed back you provided
HSS
Back to Top
 

Oldbitcollector
Professional Stuntman



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 3370
 
   Posted 8/11/2009 6:29 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Excellent!

I had to place my own manuscript on hold while I'm doing these Expos.
I'm pleased to see more materials are in the works!

OBC


New to the Propeller?

Visit the: The Propeller Pages @ Warranty Void.

Back to Top
 

MJG2514
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2007
Total Posts : 9
 
   Posted 8/11/2009 7:21 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

 

         Harprit,

                 I am glad to see that things are being written for the Prop. I have the Propeller Manual and been having a little problem with it. Sometimes, it just not simplified enough. Best of luck to you.

                                                                                                            Mark

Back to Top
 

Harprit
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 62
 
   Posted 8/11/2009 7:37 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
OBC
Thanks for the comments

Mark
If you followed the previous posts, you will see that I have tried to address your concerns. Hopefully this will be what you and others like you are looking for.
Thanks

HSS
Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
93 posts in this thread.
Viewing Page :
 1  2  3  4 
 
Forum Information
Currently it is Saturday, November 21, 2009 11:38 AM (GMT -8)
There are a total of 393,861 posts in 55,536 threads.
In the last 3 days there were 84 new threads and 712 reply posts. View Active Threads
Who's Online
This forum has 17693 registered members. Please welcome our newest member, Fosco.
48 Guest(s), 13 Registered Member(s) are currently online.  Details
Siri, Jay Kickliter, Jim Fouch, JRetSapDoog, Dogg, dMajo, hover1, ErNa, Harley, Sapieha, Electronegativity, Tubular, MicroDirk