PDA

View Full Version : Help Needed Programming



HelpMePlease
07-16-2009, 11:45 AM
First off I am sorry if this is the wrong board or the wrong way to post such a question, as you can see this is my first post.

So here is the short version of my problem, with a little background. I started college in 2000, it really didn't work out for me that well so I left. I than came back in the Spring of 2008 to finish up the last year and a half I had left. I am now down to my final class. It is an embedded systems class using the Propeller chip along with the propeller powered HYDRA. I am taking this class as an Independent Study, the teacher I have for it is no help at all. He basically gave me the materials and said I want this to happen with it. (best example I can give you is if I gave you a multidimensional block and asked you to draw it in ProE or CAD, without having any ProE or CAD experience and not giving you any guidance).

I am now stuck, the teacher wants the Propeller chip to be programed to work as a clock. He wants it to work with LED displays, but if I can get it to work on the TV I am sure he wouldn't have a problem with it. I have no idea where to start on this, and after reading these boards you all seem very knowledgeable and could prob figure something out within minutes. Any help you can provide would be very very very much appreciated. This being my last college class ever to graduate I am very ready to get it done.

Thanks in advance.

W9GFO
07-16-2009, 11:55 AM
Did you get this book (http://www.parallax.com/Store/Books/Propeller/tabid/171/CategoryID/20/List/0/SortField/0/Level/a/ProductID/474/Default.aspx) with the Hydra?

This PDF (http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PELabsFunBook-v1.1.pdf) has tons of info on it. If you don't have the Hydra book this is where I would go.

If you want to learn, this is the place to be asking for help. If you want someone to do it for you... good luck!

Rich H

HelpMePlease
07-16-2009, 11:57 AM
I am just looking for a start... I have no idea what I am doing and the teacher just does not want to help me, I just stare at the Propeller program with no idea. Thanks for the post I will be checking it out after I submit this

Mike Green
07-16-2009, 12:01 PM
1) Using a subject like "Help Needed" is a poor way to get the help you want. Next time give some information instead about what you're wanting to do.

2) Start with existing examples. There are some permanent threads at the top of the thread list in this forum. In the "Getting Started" thread, there's some very helpful information on getting started with the Propeller.

3) Browse the Propeller Object Exchange (obex.parallax.com (http://obex.parallax.com)). This has all sorts of I/O drivers for different displays including TVs and LEDs. They all come with demo programs with explanations or some documentation usually included in the source files. Have a look at anything that sounds useful for your project.

4) Download the application note on the cog counters. These can be set up to count system clock cycles and can be used for your clock timebase. That and other useful downloads are here: www.parallax.com/tabid/442/Default.aspx (http://www.parallax.com/tabid/442/Default.aspx).

5) Look at the Propeller Education Kit tutorials on the last mentioned link.

6) Look at the "Spin Zone" articles here: www.parallax.com/tabid/272/Default.aspx (http://www.parallax.com/tabid/272/Default.aspx)

Post Edited (Mike Green) : 7/16/2009 5:06:43 AM GMT

HelpMePlease
07-16-2009, 12:16 PM
Thanks Mike Green. I am looking into your links along with W9GFO's. I am not looking for you guys just to give me the entire program and I can see how it sounded like that in my original post. I was complimenting you all because I know it would take some of you less than an hour to figure this program out, maybe even less than thirty minutes, but when I look at it my brain cannot calculate or figure out what is going on. Also when my teacher doesn't even give me a starting point after I have told him numerous times "I just don't get this" I have become very frustrated.

Once again thanks again for your guidance and thanks in advance to anyone else who can help.

MagIO2
07-16-2009, 01:27 PM
Good teacher! This kind of teaching is of course not acceptable for elementary school and middle school, but for college I think it's good. Without a doubt it's a hard lesson, but it prepares you for real working life. If you plan to work in science or engeneering area you simply have to figure out·alot by yourself because you work on new frontiers. Teamwork is fine, but college should prepare you to be able to work out things the hard way - worst case scenario ;o).

I think he would have a problem if you do it with TV output. Guess you have several 7 segment displays for displaying the time?! It's something completely different to drive those than simply starting a TV driver and print the time and I think that this is exactly part of the expectation! The 'problem' already starts with wiring the 7 segment displays. You can't connect displays for hh:mm:ss with the propeller directly as you would need 42 I/O pins. Just a buzzword for you: Multiplexing.

I am pretty sure that if you stop with crying and start with studying you can solve the problem. A few weeks ago I showed my son (who is 11y/o) how to do multiplexing of several 7 segment displays with the propeller, so it's easy.

Whenever you have concrete questions a lot of people here in the forum are willing to help you.

SRLM
07-16-2009, 02:02 PM
I did something very similar here (page 5, my last post). (http://forums.parallax.com/showthread.php?p=795664) It's binary, but since you didn't specify the base I assume that's okay. :) Anyway, not to be condescending or elitist, but the code was trivial. You don't even need to use cog counters: just have a program loop that waits for a second to roll by on the system clock, then update the display.

I agree with MagIO2. I wish my professors would throw us to the wolves (so to speak...).

heater
07-16-2009, 02:42 PM
HelpMePlease: "work as a clock. He wants it to work with LED displays,"

My first advice is "DON'T PANIC".

I think people here need a lot more information here before we can offer any sensible advice, most of it about you strangely enough. We need to know where you are starting from.

So:
Can you program? Any thing, in any language?
Can you build the LED hardware?
Do you comprehend seven segment displays (I assume by the stated requirement)?
Do you understand multiplexing.?
Have you read the Propeller manual and worked your way though and tried out the bits of code in there? Starting from flashing a single LED on a pin?
Do you have the Hydra book?
Do you have to build this "clock" hardware or does it already exist for you to program?

Getting that first LED flashing is always priority when I start playing with any new embedded micro or the circuit it sits in or its operating system. It goes a long way towards fixing the ""I just don't get this" I have become very frustrated." problem as you then have confidence that something works and you understand it and you can then build on that.

Small steps is the rule.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

Cluso99
07-16-2009, 05:00 PM
For a discussion on how 7 segment LEDs work with programming search for MEK6800D2 manual. It describes how the motorola 6800 D2 kit does it. It is a 1970's manual, but describes nicely how the software and hardware work. Obviously the 6800 is an old microprocessor and you have to do it with a propeller. It should point you in the right direction though.

BTW I have simulated this display on the prop. But make an attempt first and post your code.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp (http://forums.parallax.com/showthread.php?p=786418), RamBlade (http://forums.parallax.com/showthread.php?p=810753), TwinBlade (http://forums.parallax.com/showthread.php?p=806697),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index (http://forums.parallax.com/showthread.php?p=778427)) ZiCog (Z80), MoCog (6809)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

SamMishal
07-16-2009, 11:27 PM
The Propeller Education Kit book has a program in it that does almost what you are trying to do

http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PELabsFunBook-v1.1.pdf



Page 62....also read that whole chapter..chapter 4

This is a good start point...

What is the name of your school....I am interested to see what colleges are
using the Propeller....

I think the Hydra is not the best thing for the course you are doing....they would have been
better off with the Education Kit instead.....but that is life.....

Sam

·

HelpMePlease
07-17-2009, 12:38 AM
Can you program? Any thing, in any language?
No I cannot program at all. I did have a visual basic class, but that was back in 2002 so I have no memory of that.
Can you build the LED hardware?
I have the diagram to build it, but even that is not working correctly.
Do you comprehend seven segment displays (I assume by the stated requirement)?
I kind of understand how they work, but to ask me how to explain it would be a mistake
Do you understand multiplexing.?
No
Have you read the Propeller manual and worked your way though and tried out the bits of code in there? Starting from flashing a single LED on a pin?
I have worked through those 10 examples in that book and had them all working, but that was mostly retyping what was in the book.
Do you have the Hydra book?
Yes I do, thats for the video game I have to make, I also have another propeller board just for this "clock" project
Do you have to build this "clock" hardware or does it already exist for you to program?
I have to wire it up on the board.

I go to Ohio Northern University. Its a very small school. This is the only class these items are used.

I will be headed out of town so if I dont reply dont think that I have lost track of the board. You all have been very helpful and I am very thankful for that.