Shop OBEX P1 Docs P2 Docs Learn Events
newbie needs help getting PropDos running — Parallax Forums

newbie needs help getting PropDos running

b.p.m.b.p.m. Posts: 59
edited 2008-02-24 05:10 in Propeller 1
hi, total prop newbie here. i am having trouble getting PropDos to
run on my demoboard. i have a SD socket i harvested from a dollar
store cardreader hooked up to pins 0...3 as per the Protoboard
Cookbook specs sans any pulldown resistors.
PropDos recognizes the SD card and keyboard then gives me a SD:>
prompt... for a third of a second. it then resets everytime.
i don't think it is the socket or card as i have had no trouble running
the HSS player from the EEPROM and loading and playing songs off the
card. just in case i tried 10K pulldown resisters on the data and control
lines; it only caused PropDos NOT to recognize the SD card.
anyone got any idea what i might be doing wrong?
(i enclose a shot of my setup below)

blake

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Can't sleep, clown will eat me."
Bart Simpson
2576 x 1920 - 472K

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-02-16 01:32
    Ok, so the keyboard and SD card being detected seemly correctly otherwise you would get an error at startup.
    Not sure why it should reboot... Tell me a little more about the dollarstore SD card reader. What did you
    pull this from? Also, would you run down your connections as I don't own a demoboard and can't make out
    the connections.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-02-16 02:03
    Best I can make out from your image is that you are using P0,P1,P2 and P7 for the SD card.
    I'll wait for you to clarify this a bit.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • b.p.m.b.p.m. Posts: 59
    edited 2008-02-16 02:18
    hey obc,
    the SD card reader is just a SD to usb interface about the size of a thumb drive. it has one
    SMT chip and assorted components like a LED and 12 MHZ crystal.
    the connections are as follows: pin 1 - CS, chip select going to P3 on the demo board
    pin 2 - DI, data in going to P2 on the demo
    pin 3 - GND, going to VSS
    pin 4 - 3.3V, going to VDD
    pin 5 - CLK, clock going to P1 on the demo
    pin 6 - GND, going to VSS
    pin 7 - DO, data out going to P0 on the demo
    pin 8 - NC
    pin 9 - NC (this is the one nearest the bevel)

    one thing PropDos is doing is always not detecting the SD card on the first pass.
    thing two (which has me worried a little about a hardware glitch) is i tried the ESC key
    to run a LED blinking program i renamed 'menu.bin' and that is not only not working but i
    lose the SD:> prompt after it reboots and on subsequent reboots.

    blake

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson

    Post Edited (b.p.m.) : 2/16/2008 2:36:44 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-02-16 02:52
    Try removing this section of code and let me know what happens.
    (From PropDOS)


      if \fsrw.mount(spiDO,spiClk,spiDI,spiCS) < 0
         text.str(string(13,"No SD card present.",CR))
         text.str(string("SD card expected on: "))
         text.dec(spiDO)
         text.str(string(", "))
         text.dec(spiClk)
         text.str(string(", "))
         text.dec(spiDI)
         text.str(string(", "))
         text.dec(spiCS)
         text.str(string(13,CR,"System halted.",CR)) 
         abort 
    
      waitcnt(clkfreq + cnt)
      if not key.present                                
         text.str(string(13,"No keyboard present",CR))
         text.str(string("Keyboard expected on: "))
         text.dec(keyboard)
         text.str(string(13,CR,"System halted.",CR))
         abort
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • b.p.m.b.p.m. Posts: 59
    edited 2008-02-16 03:21
    hey again obc
    i took out the lines of code you suggested, but it made no differance. the board is still rebooting after about a half second. also when i hold the ESC key down to try see if 'menu.bin' will kick in, the command line fills up with 'K's and no action other than rebooting.
    i've tried a differant keyboard and a differant power source. i know i'm just grasping at straws now. any ideas?

    blake

    p.s. question: how many cogs does PropDos use?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson

    Post Edited (b.p.m.) : 2/16/2008 3:52:44 AM GMT
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-16 04:02
    Aren't the resistors meant to be pullups and not pulldowns?
  • parts-man73parts-man73 Posts: 830
    edited 2008-02-16 04:14
    B.P.M. said...
    Cookbook specs sans any pulldown resistors.........just in case i tried 10K pulldown resisters on the data and control
    lines; it only caused PropDos NOT to recognize the SD card.

    These should be pull up resistors, not the other way around. you should pull these to VDD(3.3 V), not to VSS

    Try pullups instead and see what results that gives you.

    Also, did you verify the pinout of the card, verses the socket. If the Propeller is reseting, I think you've got a short VDD to VSS. The leads coming out of the socket may not be leading to were you assume they lead, that's the only explanation I can think of for spontaneous reboots. I don't believe the software is the problem, but I'm also surprised that the program detects a SD card at first.

    Hope one or more of these suggestions help

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio - the modular Development system for the Propeller

    PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!

    SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-16 04:17
    I would have assumed a short somewhere too but he says in the first post that the HSS player works fine. It will be interesting to know.
  • parts-man73parts-man73 Posts: 830
    edited 2008-02-16 04:18
    Stevenmess2004 said...
    Aren't the resistors meant to be pullups and not pulldowns?

    That's what happens when it takes me to long to type a reply, your message wasn't there when I started typing my reply smilewinkgrin.gif
    Stevenmess2004 said...
    I would have assumed a short somewhere too but he says in the first post that the HSS player works fine. It will be interesting to know.

    Anything getting hot? I used to know a mechanic that located shorts in a vehicle by putting a paperclip in place a a fuse that kept blowing, he then looked for where the smoke was coming from freaked.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio - the modular Development system for the Propeller

    PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!

    SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board

    Post Edited (parts-man73) : 2/16/2008 4:24:53 AM GMT
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-16 04:22
    Yeah, I've done that several times. Maybe someone should volunteer to add a feature to the forum software that indicates to everyone reading the thread when someone is writing a reply. Like I said when I suggested this in another thread though I don't think that parallax has time for simple things like that smile.gif
  • b.p.m.b.p.m. Posts: 59
    edited 2008-02-16 04:55
    hey obc et al,
    i played a hunch and got PropDos working...for as far as i can tell at the moment.
    i compared the OBJ sections of HSS player and PropDos and only differance was the Full Duplex object. so i cut it out and compiled a few times cutting out any line that caused an error. when it compiled finally i loaded the EEPROM. i ran it and BINGO it worked perfectly!
    i tested the DIR, the DIR/W, and the SPIN commands so far and they work with no problems.
    why this is so, to be honest i'm not totally sure. maybe OBC can shed some light on this.
    for now this is good enough. now I just have to learn how to adapt a VGA driver to PropDos successfully. you see i have one TV and three VGA monitors.
    i'm still wondering if the number of cogs being called has something to do with it. once i get through chapter three of the Prop manual i'll write a program to test all 8 cogs to the limit.
    thanks for all the input guys.

    p.s. about the resistors, jeff ledger mentions in his ProtoCookbook the use of pulldown resistors as an option for SD sockets. if someone can clarify which should be used for future reference it would be helpful. for now no resistors seems to work for me.


    blake

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson

    Post Edited (b.p.m.) : 2/16/2008 5:16:33 AM GMT
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-16 05:09
    Do you have anything hooked up to pins 30 and 31?
  • b.p.m.b.p.m. Posts: 59
    edited 2008-02-16 05:28
    hey steven,
    i only have the USB hooked up when i am loading the EEPROM. i have to move the demoboard to my worktable if i want to use a monitor as there is not enough room on my computer desks for a full keyboard/demoboard/monitor setup alongside my regular computer. so when i've been running PropDos there is nothing hooked up to the USB (pins 30 & 31). do you think that makes a differance? (i don't see how.)

    blake

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-16 05:48
    It could as PropDOS is set up to use the serial port to communicate with PropTerminal but I wouldn't think that it would make a difference. Has anyone else used PropDos without being connected to a serial port?
  • KeithEKeithE Posts: 957
    edited 2008-02-21 21:12
    b.p.m. I had the exact same symptoms as you when trying to run standalone. I just disconnected the SD card completely and still see the reboots occurring with the same period. (I wanted to rewire it anyways since my wiring was ugly.)

    However I did have some luck previously when I had a laptop connected to the USB port. I'll rewire later tonight.

    If you can post an alternate image with the serial fix, or better yet with VGA please let me know. I have two spare LCD flatpanels, but the only way for me to view composite besides relocating to my living room is through a low end converter box that does a horrible job.
  • KeithEKeithE Posts: 957
    edited 2008-02-21 21:52
    I just rewired my sd socket (left out the pullups for now assuming that the prop would always be driving CS, DI, and CLK) and confirmed that I can boot propdos when usb is connected, and then disconnect it. After that things seem to be fine until I cycle power. I did not try any commands except for DIR, PLAY, and STOP so it wasn't a very thorough test. I can play some of the HMUS files from the HSS site (http://www.andrewarsenault.com/hss/hmedia.html) however others cause strange graphics to appear, or reboot the system.

    It's sort of pain dealing with the short versions of the long filenames - I'm not sure how one can avoid them. When I have more time I could figure out which files caused the problems. I had seen the same sorts of problems before, and hoped that it was my bad wiring job that caused them to be read incorrectly from SD.

    I'm using a microSD adaptor soldered to a standard header as my socket since I happened to have a spare.
  • KeithEKeithE Posts: 957
    edited 2008-02-22 04:58
    Here are some HMUS files that give me trouble - giving the mangled short names since I assume that this is what everybody would have to type in. Hopefully these are consistent across systems.

    YMA-DR~2.HMU - trashes screen, have to reboot
    YMA-KA~2.HMU - see above
    YMA-TH~2.HMU - some garbage printed out, but prompt still works. Song plays for a while then gets stuck. Can play another song afterwards.
    FL-RAI~1.HMU - screen goes blank, song plays for a while though I didn't see for how long. Have to reboot to get to prompt
    KRAFTW~2.HMU - screen goes blank, have to reboot
    TUBULA~1.HMU - garbage fills screen, plays for a little while, have to reboot
    TUBULA~2.HMU - garbage fills screen, hangs, have to reboot
    TUBULA~3.HMU - garbage fills screen, hangs, have to reboot

    HMUS files that play ok as far as I can tell:

    YMA-GE~1.HMU
    YMA-TH~1.HMU
    YMA-MR~1.HMU
    YMA-MR~2.HMU
    YMA-MR~3.HMU
    YMA-GR~1.HMU
    YMA-DR~1.HMU
    YMA-KA~1.HMU
    FL-SYT~1.HMU
    KRAFTW~1.HMU
  • KeithEKeithE Posts: 957
    edited 2008-02-23 06:13
    Based on b.p.m.'s experiment I commented out the line:

    ' ser.start(serRecv,serXmit,%0000,speed) ' Control link via prop-plug

    After this I can run propdos without having to plug the usb slave to my laptop. I still have problem playing the songs that I mentioned above. I am able able to startup FemtoBasic_COLOR with the spin command.

    I looked through the code and schematics, and can't understand why the usb connection would be necessary. But I haven't done any real propeller development yet so I'm probably missing something.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-02-23 15:25
    I really should remove the serial terminal program from PropDOS, and now that I've written
    something better, it will be removed from DOS itself. Some of the HMUS files are too large
    to be loaded into the available memory, which was the reason HSS player was written.

    I'm overdue for an update on that program. Perhaps after I get warrantyvoid finished.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • KeithEKeithE Posts: 957
    edited 2008-02-24 04:53
    Thanks for the response - I mainly wanted to make sure that my platform was stable. I replaced my video cable today which made the composite video look more reasonable. I should have looked at the file sizes - since I'm new to PropDos I didn't know that it didn't do any sanity checking on the filesizes.

    I have a question about the build that you apparently did - ZIN_Unterwelt_010_NOSOUND_DEMOBOARD.binary

    When I look at the object info for that I see:

    Clock Mode: XTAL2 + PLL16X
    Clock Freq: 80,000,000 Hz
    XIN Freq: 5,000,000 Hz

    Shouldn't the Clock Mode be XTAL1 + PLL16X given the 5 MHz XIN frequency?

    The reason that I ask is my video is a little funky, and I wonder if my clock is unstable. I don't have an oscilloscope at the moment, and am not sure how to edit the clock mode. I don't know how much margin there is, but I see that this mode is recommended for an XIN frequency of 8-32 MHz.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-02-24 04:57
    Hmm.. I did the conversion from Hydra to Proto on that binary. I may have missed that..
    I'll double check Sunday afternoon... How where you able to read that information from a binary?

    OBC


    KeithE said...
    Thanks for the response - I mainly wanted to make sure that my platform was stable. I replaced my video cable today which made the composite video look more reasonable. I should have looked at the file sizes - since I'm new to PropDos I didn't know that it didn't do any sanity checking on the filesizes.

    I have a question about the build that you apparently did - ZIN_Unterwelt_010_NOSOUND_DEMOBOARD.binary

    When I look at the object info for that I see:

    Clock Mode: XTAL2 + PLL16X
    Clock Freq: 80,000,000 Hz
    XIN Freq: 5,000,000 Hz

    Shouldn't the Clock Mode be XTAL1 + PLL16X given the 5 MHz XIN frequency?

    The reason that I ask is my video is a little funky, and I wonder if my clock is unstable. I don't have an oscilloscope at the moment, and am not sure how to edit the clock mode. I don't know how much margin there is, but I see that this mode is recommended for an XIN frequency of 8-32 MHz.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • KeithEKeithE Posts: 957
    edited 2008-02-24 05:10
    I just opened the binary in the propeller tool and a window titled "Object Info" appears.

    Also I tried to convert Hydra logo by following your hints in the "Converting HYDRA specific programs to other boards" thread. It sort of works, but there's some garbage on the screen mixed in with the working bits. Have you ever tried to build that for the protoboard or demo board?
Sign In or Register to comment.