my head is Spinning :)
whiteoxe
Posts: 794
I·have only just connected to a breadboard(used regulater 1Amp and 16volt Capacitors) and hoped it would allwork ,yep no prob!
After working through the PE Labs ( couple of times i started getting the hang of it but still working through them again especially the Counter Modules.
·· Seems some basic languages provide commands whereas the spin language reqires the use of Objects to get the same things done with some extra coding; making it a little more complex.
One thing I tried to do is use one cog to send a serial data and have another Cog use 'fullduplexserialplus[noparse][[/noparse]2]'
·send·the serial mesage to the terminal , can you offer a little help here??
·I tried for a few hours, even the Debug.Start(30,31,0,57600)
and Debug.Start(16,0,0,56700) didnt seems to anything but hang program or fill trminal with rubbish!
Does the 'fullduplexserial' only work with the Parallax Terminal.
There are also Basic commands such as readdac to converent digitalto analog or commands to read from analog to digital.
I gather getting the hang of COUNTER MODULES will be the way to go. I have more questions but Ill keep experementing before i post again.
THX11_38 [noparse]:)[/noparse]
·
·
·
After working through the PE Labs ( couple of times i started getting the hang of it but still working through them again especially the Counter Modules.
·· Seems some basic languages provide commands whereas the spin language reqires the use of Objects to get the same things done with some extra coding; making it a little more complex.
One thing I tried to do is use one cog to send a serial data and have another Cog use 'fullduplexserialplus[noparse][[/noparse]2]'
·send·the serial mesage to the terminal , can you offer a little help here??
·I tried for a few hours, even the Debug.Start(30,31,0,57600)
and Debug.Start(16,0,0,56700) didnt seems to anything but hang program or fill trminal with rubbish!
Does the 'fullduplexserial' only work with the Parallax Terminal.
There are also Basic commands such as readdac to converent digitalto analog or commands to read from analog to digital.
I gather getting the hang of COUNTER MODULES will be the way to go. I have more questions but Ill keep experementing before i post again.
THX11_38 [noparse]:)[/noparse]
·
·
·
Comments
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lonesock
Piranha are people too.
The code below is probably rubbish but i just wanted to show what I am doing. My experence is so basic I did a jig when I got the prop hooked up without knowing what a capacitor even was and using a 16V C instead of a 6.3 volt, then I used a 1 amp 3.3V regulator which the diagram said a 400mv(think) I got the potemeter RC working and everyother LAB. I did find the counter module confusing till i read it 3 or 4 times then it sunk in.
I dont really get why I have to use a capacitor RC delay when another type of basic chip i used a little while ago read the potimeter using a readac command to measure the voltage being applied to an input pin which was an analog to digital conversion pin.
I suppose this method type gives all the prop pins greater flexibility. Like there seems to be no serin serout pins or command for them allowing this conversion to be done on any pin.
I have played a fair bit changing the code and the tx and rx pins, trying to get ·tx("2") from pin1
and then trying to send the debug[noparse][[/noparse]2].tx("2") to the pin designated 0
Then i wanted to send that "2"· to the parallax terminal.
Sorry I have mucked about so much with the code its all looking a bit back to front but whatever I made no or little progress. Can anyone comment on my above dilemas ?
· PPS· := whats the largest voltage capacitor that might be able to be used setting up a breadboard with
the two regulators ...25?
First of all. In the circle of beginners You are OUTSTANDING GOOD !
You maybe think: "hum ? why that ???"
Because you posted your code regardless of what bugs might be into it.
To all other beginners: EVERY Member in this forum is really friendly !
So feel free to post or attach your code regardless of how messy or buggy it might be !
This is the BEST WAY to get quick advice and correction !!
OK now to your code:
you don't have to start new cogs for everything
send and receive can be done in a repeat loop. See code below.
if you want to start several cogs declare a NEW stackvariable for each cog instead using parts of on big array
using parts of an array. This is a source of bugs ! Different NAMES are much more sure to use the right one.
For sending serial data to the PC you just need a serial driver like FullDuplexSerialPlus ONCE
short democode
don't code so much nestings as a real beginner
don't code things like
the line above does the following
wait for a byte to be received from driver 3
and after received it send it over driver 3
BUT as the receive is done first this code waits endlessly for something to be received
more sense would make
driver 2 send what driver 3 has received still not very good as this would send around in circles endlessly
with no feedback to you (over debug to PC) to see what is going on
try this code
If you want to debug what is going on add debugoutput after EVERY SINGLE step like this
Posting code directly into a message take a lot of place. I did it here that other newbees can directly learn by reading it
For bigger codes than 10 lines use the Post Reply button and the attachment manager
For a deep analyse of your code attach the COMPLETE code
use the file - archive - project... function (File-Item of the main-menu of Propeller-tool) see attached picture
best regards
Stefan
So feel free to post as many questions and attached code as you like
Post Edited (StefanL38) : 10/21/2009 10:31:13 PM GMT
Your encouragement was very appreciated !!!