Shop OBEX P1 Docs P2 Docs Learn Events
Hybrid / Hydra Port Test — Parallax Forums

Hybrid / Hydra Port Test

ColeyColey Posts: 1,110
edited 2008-03-15 22:37 in Propeller 1
I wonder if one of you many Hydra users out there couldn't just try this little app for me.
I am trying to determine if we can check for Hybrid / Hydra presence through software.
This little app just outputs the status of the first 24 pins, Debug led should flash and show 1 or 0 on the TV depending on the state of the pin.

As an example Hybrid with Mouse, Keyboard and SD card plugged in or unplugged returns:-

000000000011111111112222
012345678901234567890123
000001101111111100000000


Regards,

Coley

oops, almost forgot.... please can you post your results, thanks.... tongue.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite

Title_Logo_Small.jpg

Post Edited (Coley) : 3/14/2008 11:18:58 PM GMT

Comments

  • BamseBamse Posts: 561
    edited 2008-03-14 22:56
    Not much to report...

    I can see it loads but that is about it...
    It's just a blank screen... wink.gif

    Did I miss something ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-14 22:59
    Coley, doesn't the Hybrid use a different eeprom? If it does you might be able to use that.
  • ColeyColey Posts: 1,110
    edited 2008-03-14 23:17
    Oops, my bad!

    I forgot the Hydra was only 80MHz....

    I've updated the binary if you could be so kind to try again.

    Thanks,

    Coley

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite

    Title_Logo_Small.jpg
  • csfancsfan Posts: 14
    edited 2008-03-14 23:54
    Coley,

    I get the following with mouse, keyboard and SD on my Hydra.

    000000000011111111112222
    012345678901234567890123
    010001000101010111110000

    The red 0 toggles 0/1 for the debug led.
  • ColeyColey Posts: 1,110
    edited 2008-03-15 00:20
    Thanks csfan,

    As I suspected we can identify the Hybrid from the Hydra from the Mouse and Keyboard ports.

    On Hybrid Keyboard and Mouse are via 4 i/o Pins P12--P15 all are normally held high.

    On Hydra Keyboard and Mouse are via 8 i/o pins P8--P15 with P8,P10,P12 & P14 High and P9,P11,P13 & P15 being Low.

    So a simple check on P15 should give the following:-

    1 = Hybrid
    0 = Hydra

    This of course will need to be done before starting and keyboard or mouse objects.

    Thanks once again to everyone! yeah.gif

    Regards,

    Coley

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite

    Title_Logo_Small.jpg
  • Jasper_MJasper_M Posts: 222
    edited 2008-03-15 15:29
    How about writing a small SPIN object that has functions like GetVideoBasePin, SetClockFrequency, GetKeyboardPin, GetMousePin etc. that would return the values according the hardware (Hydra, Demoboard or Hybrid) it's running on? Are you going to do something like that? It'd be nice ... : )

    Demoboard could be detected by setting one of its video pins high and setting another as input and check whether or not the input is high.
  • JT CookJT Cook Posts: 487
    edited 2008-03-15 17:07
    What happens if you don't have a mouse or keyboard plugged in? For my units, I usually just have the control pads plugged unless I am using either mouse or keyboard.

    Then you still have the issue of clock since you can't change it on fly(not that I am aware of at least).
  • BaggersBaggers Posts: 3,019
    edited 2008-03-15 17:26
    JT, I've already asked Coley that, he said it still comes out right, you have to test before you init the keyboard/mouse objects.

    Oh, and as for the clock, we're gonna do a test to see if you can start in RCfast mode, and reset the clock accordingly [noparse]:)[/noparse]
  • Jasper_MJasper_M Posts: 222
    edited 2008-03-15 17:57
    There's the clkset instruction, it can change clockmode actually. In fact, the booter program in prop firmware that loads the program from EEPROM or computer uses the instruction to set clock initialky.
  • JT CookJT Cook Posts: 487
    edited 2008-03-15 19:13
    Hmm, that would be cool to make a 1 binary fit most approach! As far as I can tell, my two programs wouldn't be too hard to change to to have it start start drivers for specific pins as long as it knows what unit it is. The only problem I can think of is that the mouse driver for the Hydra and mouse driver for everything else is different because the Hydra uses 4 pins for mouse and everything else only needs 2 pins. It probably wouldn't be too hard to make a driver that could do both tho since there is already a keyboard driver that does that.
  • Jasper_MJasper_M Posts: 222
    edited 2008-03-15 21:32
    Yeah...

    All my graphics drivers use a hard-coded FRQA, so they won't run on Hybrid... But I'll change that some time....
  • BaggersBaggers Posts: 3,019
    edited 2008-03-15 22:37
    Looks like this could be a way forward [noparse]:D[/noparse] to reducing end user modification to get apps running on their system [noparse]:)[/noparse]
Sign In or Register to comment.