Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > Propeller Chip > TriBladeProp PCB: Uses 3 Propeller ICs for a Single Board Computer (SBC)  Forum Quick Jump
 
New Topic Post Reply Printable Version
849 posts in this thread.
Viewing Page :
 
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 10/25/2009 1:14 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
I was only guessing Tiverton. It's a strange world down in those parts. Let's see.


For me, the past is not over yet.

Back to Top
 

Dr_Acula
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 : 606
 
   Posted 10/25/2009 2:35 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Re Cluso The last few times I compiled I left the 8080 option defined. So now you have to compile using bst. Also, you seem to be using an older version (not rr126) as you have floppy support enabled. We are past that so that is why it probably didnt find drive B in floppy format. You should get a CPM message saying 8HD meaning 8 hard disks.

Yes I've just taken the entire package of files Cluso gave me and stripped it back to just the necessary ones, put back in the right #defines and made sure the right files are on the sd card. Also edited the BST.BAT file, and copied the necessary .dll files over for a minimal teraterm.

It took about half an hour and you need to know the ins and outs of the code. There is quite a lot of code accumulating that is legacy code that adds the complexity of multiple nested #ifdefs. These ifdefs are starting to become a language in their own right, but they are not really structured, ie no indents and it is hard to match up the endifs with their corresponding ifdef. Also there are many #else commands that made sense when there were just two board options, but with the ramblade there will be three (and with a board I'm working on there will be four) so they all need to change from #else to #elseifdef. I don't know if there maybe is a way of adding to the #ifdef syntax in some way. I was wondering about the option of #ifdef mydefine and then #endif mydefine. That would be backwards compatible.

Bottom line is it probably is time to rerelease a package with everything in one file. All the spin code. All the working hard drive images (but not necessarily the ones we needed to get here, eg the floppy ones). Plus BST and ? a terminal program. I put one together and minus the hard drive images it is only 400k.

Re the comments on the schematic and board for just blade 2, that will almost certainly become unnecessary once the tiny ramblade comes out.

Hmm, Cluso, I just had a thought. Since many of the parts in the ramblade are a bit unusual and since shipping is so high for one chip and since you are throwing together a very attractive package (soldering up the tiny chips), I wonder about adding another $10 and including a micro sd card with all the software on it? The hard drive images, plus a folder you copy back onto the PC with all the spin code and BST etc? Ok, it will become obsolete over time, but at least that will be a package that will work out of the box just by plugging it into a demo board, and then users can see it working quickly and then once it works they can go online and get the latest version?


www.smarthome.viviti.com/build

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 10/25/2009 3:19 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Drac: You jumped the gun! I am planning on releasing a version fully assembled with the eeprom programed and microSD card formatted and loaded. The board will be fully tested and will run with the addition of the power supply and serial interface (whichever option is chosen). I have a front end like PropDos/PropCMD to write (complete) to allow for the ZiCog/TriBlade/CPM binary or another binary or a question to ask after displaying the prop binaries found. The eerpom code should not require to be changed (ever I hope) because the initial binary will be loaded from the microSD on powerup. By changing a microSD, a new operating system or bootup can be done. No PropPlug should be required.


Links to other interesting threads:
Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 10/25/2009 3:28 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Heater

No, not that far down. Just Bath, Somerset. My parents now live in West Dorset, almost Devon. Only been to Tiverton once, it's miles from anywhere !!


Style and grace : Nil point

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 10/25/2009 5:30 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Toby, then you should come to Australia. At present I am in Adelaide which is 1400km (about 870 miles) from Sydney and takes 16 hours to drive - done it many times. Sydney to Brisbane is about 800km (500 miles) and takes 9 hours to drive. We do this most months. I am just about to fly back from Adelaide to Sydney, then drive 2 days later to Brisbane. Driven from Sydney to Perth a number of times years ago - about 2800 miles - 3 1/2 days. London to SOuthhampton, Tiverton (& Cornwall?) then up to Liverpool and across to Oxford & Cambridge, and back to London was a walk in the park :-)

Better get back to RamBlade & TriBlade...


Links to other interesting threads:
Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 10/25/2009 9:08 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
True but the way our roads are it takes half a day to cross London. From here the midlands it can take so long to get to Cornwall they have put on scheduled flights. I have done sone decent distances over in France and Spain. SHE didn't like it.

Back to the silicon. Compiled and loaded a more recent vesion of Zicog CP/M and now shows Z80 and 8 HD's. Bumped it up to 6MHz and it ran ok, tried a 6.55MHz xtal I had, recompiled but crashed on the ram clearing/loading bit, I think. Tried 12MHz pll8x and ok, pushed it to 14.3MHz and it just had an fit. This is with SM caps and tants right under the prop.

When I put the higher figure freq into the xinfreq line if I do 12 000 000 it throws a maths error, but 12000000 is ok. I don't know if this a bug or my denseness

Only got it going late last night, trying to break it already !!

Addit 1 Just checked the current for this, and it starts off at 3mA goes up to 80mA whilst it talks to the SD and then idles at about 40mA (46mA whilst looping in mbasic) so a 2AH lithium battery should last a while, even with a blade1 VDU.

Addit 2 What is the favoured thinking on the VDU bits. Shall I just bolt on a simplified Blade1 with its latch and memory, or just put a "demoboard" on with propcomm ?
If things are going Ramblade dirrections then what will the memory be used for ??


Style and grace : Nil point

Post Edited (Toby Seckshund) : 10/25/2009 8:06:04 PM GMT

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 10/25/2009 2:27 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Toby: 12 000 000 needs to be 12_000_000. In your use it is actually seeing 12 not 12000000.

Once you go much above 6MHz you will have to introduce a nop delay to the ram as the timing will be out of spec here. I will do the retiming later when my higher xtals arrive. IIRC 6MHz is about the timing limit. BTW 10nS parts will not solve this timing issue.

1. Forget my actual current tests. I expected that 1xram, prop, SD, latch & eeprom < 100mA max and yes IIRC the max I saw was 80mA running.

2. Forget the ram for Blade #1. I put the ram there to try for video buffer. Noone has tried it and I haven't had the time. So use any available board... Proto (w USB unless you have PropPlug which you must have I guess - I don't - I use a FT2232 board and extra transistors to give 2 equiv PropPlugs, but of course use the TriBlade section now as it is easier), Demo, Spin Studio, or any of the other boards on the market.


Links to other interesting threads:
Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 10/25/2009 2:38 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
I did not put any NOP in. Running 6.5536MHz apparently no problem.


For me, the past is not over yet.

Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 10/25/2009 3:04 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
I havent a clue where the 6.55MHz rock came from, but at 104+MHZ the overclocker bit. I wonder if the jiggled addr line order has had an effect ? I have now got a 12MHz running at pll8x so the pll bits are not the problem, and I do like the idea that 50/50 from the devide by 2 stage has to be a better ideal.

Wait states for the ram, This tread really does have nostalga !!! I seem to feel, somehow, a tad bit, more secure.

I had assumed that as the 5/6 MHZ were written without underscore separators that I could do the same I now wonder if there is a font issue so that I cannot see the underscores.


Style and grace : Nil point

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 10/25/2009 6:14 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Toby, the other issue with overclocking is that you require a quiet pcb - lots of decoupling and ground planes. Did you build pcb or are you just wiring it on a protoboard or veroboard or something (you may have said above, but I don't recall). If so, forget overclocking as this is not going to be quiet enough for reliable operation. Some pcbs will not do the higher speeds either because of their design.

BTW 6.5MHz & 14.31818 xtals are readily available, as are some other common frequencies.


Links to other interesting threads:
Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 10/26/2009 3:49 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

I'll make no claims that the PCB is of merchantable quality, but I do try to build as much of the past learnings into them. Single layer, wire links, no ground plane but the iron for the toner tranfer is mine. A version of the Demo Board has run at 14.3 X 8 with the same efforts. I was only trying to see how far it could be pushed and the back off a safe(ish) margin. My original Nascom1 would run at 4MHz even with its 2.5MHz Z80.

I wish I could do Thru hole, 4 layer stuff but my ironing just isn't good enough.


Style and grace : Nil point

Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 10/26/2009 5:07 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Get the wife to do the ironing :)


For me, the past is not over yet.

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 10/26/2009 5:15 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Toby, that is a great achievement. How fine can you get the tracks/spaces ? I route most signals with 8/8mils (power I try 12 or 20mils).

For overclocking on the prop, ground planes and decoupling both sets of pins pwr/gnd (for DIP) is essential, plus a 10uF tantalum also. As I said, there are also timing issues with the ram that I haven't checked yet (for the higher overclocking). IIRC I checked to 100MHz and all was OK. Of course some chips will be better than others, but that's the risk we take with overclocking.


Links to other interesting threads:
Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 10/26/2009 5:33 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
More seriously, Toby, what paper are you using for toner transfer? I did not have much luck with anything I tried a couple of years ago.


For me, the past is not over yet.

Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 10/26/2009 12:10 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Tesco value Photo paper, Glossy finish A4 170gsm. Its about £8 for 50 sheets, but I rarely use more than A5 so they can be sliced in half (100 attempts).

I tried loads of different paper types including some very expensive ones but the Tesco one seems best and cheap. It does leave some of the surface (clay?) behind after the bulk has soaked off, but a cloth, point and a bright light allows that to be picked out ok. Also have the PCB a fair bit bigger than the artwork or the edge bits will suffer. Very hot Iron required.

I would put a picture up but it doesn't want to focus.

The pitch is usually based around 100 mil chips so I tend to go as large as poss. 20 mil tracks with 10 mil guards for 60 mil pads. 12/15 mils is usually ok but I tend towards larger so that any undercut is not a problem.

I was reading Ale's CPLD thread earlier, about sunflower oil and UV. I feel a project forming.


Style and grace : Nil point

Post Edited (Toby Seckshund) : 10/26/2009 8:23:37 PM GMT

Back to Top
 

Dr_Acula
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 : 606
 
   Posted 10/27/2009 5:11 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
With much fanfare and excitement, the Southern Hemisphere Zicog/Tribade Conference (v3) was held earlier today. Apologies were noted from heater...

Cluso is getting very close to releasing the ramblade. One option available will be a presoldered version including a micro sd card with all the necessary software on the card. The single package version has got me thinking about this in a different way. Here we have a tiny CP/M computer all in one package that fits into a standard prop demo board.

But - it can fit into other boards too, as long as those boards copy the prop demo board standard. We discussed the software standards one could have. From the CP/M boards point of view, it can have 256 software I/O ports, eg OUT n,byte or IN n,byte where n is the port number. From the host boards point of view, each of these can be trapped in some spin code. From time to time, the CP/M board would ask for a list of changed I/O ports and those are sent over via a 2 wire interface.

But the possibilities for the host board are endless. It can have vga, keyboard, LCD display, audio and some analog I/O and relays and optocoupled inputs. It can also talk to three different types of wireless comms - RS232 modules (Hope/Yishi etc), raw RF modules with some filtering in spin, and even direct RF at a few megahertz with the appropriate antenna (?a loop antenna). It could talk to the 4dsystems serial camera module and capture pictures. It can use the nifty FSK object to send data via audio or a phone line or a handheld CB radio. Spin code in the host will pre-process the data to a format that CP/M likes, which is generally of the form of two bytes - one is a 'flag' byte to say a byte has arrived, and the other is the actual byte.

With radio and video capture, plus the multiple languages available in CP/M, it ought to be possible to start building intelligent networks, eg mobile robots that rove around taking pictures and sharing the information. We also discussed the ability to update software via wireless, even the protocols one could use to emulate a simple bittorrent upgrade system via wireless with multiple nodes.

Now the ramblade design has been fixed, I'm going to start thinking about the parameters for a host board. All very exciting!


www.smarthome.viviti.com/build

Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 10/27/2009 12:03 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
I was idly looking at a keyboard and thinking, surface mount the chips, a couple of SD cards and perhaps some smaller lith batts - one self contained (perfectly disguised) office prop plaything.

And another thing ..

Is it possible to have the #IFDEFs and #ELSEs to "light up" as partners ???


Style and grace : Nil point

Back to Top
 

Dr_Acula
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 : 606
 
   Posted 10/27/2009 2:15 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Is it possible to have the #IFDEFs and #ELSEs to "light up" as partners ???

Yes, I'll second that. The ifdef function in BST (and homespun) is proving so useful that it is now being pushed way beyond its initial intention. Some ifdefs are nested 3 deep and span several pages and it gets quite hard to trace the code.


www.smarthome.viviti.com/build

Back to Top
 

Dr_Acula
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 : 606
 
   Posted 11/1/2009 4:17 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
@Cluso, would you mind answering a technical question please?

I'm trying to trace program execution. I get this

  UART.str (string("Starting Hdisks... "))
  crlf
  blockno := 0
  count := 8192
  FindSDblock  

then

PRI FindSDblock | i, n, r                               'read blockno of file for count into buffer

  r := sd.startSD(@ioControl)                           'start the SD routines
  UART.str(string("SD started...")) 
  CheckError(not r)
  r := sd.mount_explicit(spiDO,spiClk,spiDI,spiCS)      'mount the SD
  UART.str(string("SD mounted..."))
  CheckError(r)


Which prints "SD started..." on the screen and then hangs.

I've change the pins so my pins should be correct.

  spiDO         = 13
  spiClk        = 14
  spiDI         = 15
  spiCS         = 9



I think it then jumps to sd.mount_explicit which is;

pub mount_explicit(DO, Clk, DI, CS) | startBlk, sectorspercluster, reserved, rootentries, sectors

By this time, should /CS be low?

I'm going back to 'r := sd.startSD(@ioControl) 'start the SD routines'
Does this set /CS low? What is @iocontrol?

I'm trying to work at a very simple level - where is the code that sets /CS low for the first time?

Help would be most appreciated as I'm getting lost in amongst the code.


www.smarthome.viviti.com/build

Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 11/1/2009 12:24 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Pics of my feeble attempts.

(I made the mistake of trying hairspray instead of PCB lacquer, used to work when I was a kid)


Style and grace : Nil point


Image Attachment :
Image Preview
Blade2 and PropCMD_Blade2PCB.JPG
  462KB (image/jpeg)
This image has been viewed 27 time(s).
Back to Top
 

Dr_Acula
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 : 606
 
   Posted 11/1/2009 2:51 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Hey Toby, that looks really good!

What is the circuit again? The little board looks like a Blade2 with the ram, latch etc. (Similar to the one that Cluso is going to shrink down to the size of a pinhead!). What is the bigger board?

Also how long did it take to make these and did it take long to get it onto a single sided board? Was that handrouted?


www.smarthome.viviti.com/build

Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 11/1/2009 3:56 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
The little one is a bare blade2 (half meg) and works, thank you all, it has mesed up address and data orders to make tracks simpler.

The board next to it is the same ( with tweeks) plus a "DemoBoard" version of the PropCMD and regs etc. So it is nothing more than a blade3 free ....

Tomorrow there should be some output from it, I have drilled half the holes, before pretending I still care (do I need therapy... ) and having to lever out my 2, of 3, props from other things.

I wasn't showing off(ish) I just wanted to point out that I could make things(ish) (ish).


Style and grace : Nil point

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 11/1/2009 7:02 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Toby: Very nice. Congratulations and welcome to the club :-)

James: sd.mount_explicit makes cs low.
sd.start just passes the variable iocontrol so I can find out the sector address - this is where this routine stores the next sd sector address.

I have had some things to take care of back in Gosford :-(


Links to other interesting threads:
Back to Top
 

Dr_Acula
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 : 606
 
   Posted 11/1/2009 7:17 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Ok, thanks cluso, I'll delve into that code when I get home.


www.smarthome.viviti.com/build

Back to Top
 

Dr_Acula
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 : 606
 
   Posted 11/2/2009 3:31 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Hi again Cluso. The quest for the /CS low code continues.

But now I'm really stuck. To be totally frank, Spin has me completely confused. I see code like this:

   if (brlong(@buf+$36) == constant("F" + ("A" << 8) + ("T" << 16) + ("1" << 24)))
      startBlk := 0

To someone used to coding basic, I think this is something like

if brlong$="FAT1" then startBlk=0


But it seems a hard way to do things for a high level language. Everything has to be grouped into groups of 4 bytes and it uses a lot more characters to describe what you want to do. My personal opinion is that if it is going to be this hard to do strings, may as well do them in assembly. I've written string compare routines in Z80 assembly that are easier to understand than this.

Anyway, gripe over. My goal is to find the code that makes the CS line low. Then I can put a halt after that line and test if indeed it went low.

The routine

pub mount_explicit(DO, Clk, DI, CS)


calls this

   if initSDCard(DO, Clk, DI, CS)
      abort -string("InitSDCard mount")


I think that then jumps to this

pub initSDCard(DO, Clk, DI, CS)
   return ldr.initSDCard(DO, Clk, DI, CS)


Which then jumps out of the fsrwfemto_rr001.spin object and goes to the sdspifemto.spin object. Which has the alias of ldr in the main spin program...

Which takes us to this code also called initSDCard()

PUB initSDCard(DO,Clk,DI,CS) | t                       '' Initialize SD card access
  t := cnt
  repeat while long[control][0] & ioTestRdy            ' Wait for previous I/O to finish
  long[control] := 0
  long[control][0] := ioSpiInit << 24 | DO << 18 | Clk << 12 | DI << 6 | CS
  repeat while long[control][0] & ioTestRdy            ' Wait for this to finish
  return (long[control][0] & ioTestErr) <> 0           ' Return any error code


But I can't see anywhere there that outputs a high or a low to a pin.

So, rather than ask how to do this (part of this is a learning exercise!), can I ask whether there is a way I can add in little bits of code that send debug messages back to the PC?

eg, in the main program, one could add

UART.str(string("Test point 1"))


Is it possible to add these sorts of debug messages in other (what I would call subroutines, but I think are called objects), eg in sdspifemto.spin? And, what would be even more useful, in the middle of PASM code in some way?

Or maybe another option is a completely new program, stripped right back to the bare essentials that opens a file on an SD card, writes"A" to the file and closes it. Just to test the card actually works.

Help would be most appreciated!


www.smarthome.viviti.com/build

Post Edited (Dr_Acula) : 11/2/2009 11:38:20 AM GMT

Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
849 posts in this thread.
Viewing Page :
 
 
Forum Information
Currently it is Friday, November 20, 2009 10:59 PM (GMT -8)
There are a total of 393,737 posts in 55,521 threads.
In the last 3 days there were 82 new threads and 702 reply posts. View Active Threads
Who's Online
This forum has 17687 registered members. Please welcome our newest member, mark09.
54 Guest(s), 6 Registered Member(s) are currently online.  Details
Peter Verkaik, BradC, Harley, Chris Savage (Parallax), Rich_W8VK, potatohead