Shop OBEX P1 Docs P2 Docs Learn Events
Propeller not found on a simple configuration — Parallax Forums

Propeller not found on a simple configuration

inakiinaki Posts: 262
edited 2006-05-06 18:00 in Propeller 1
I have prepared·a very simple circuit, just the power supply and the USB2SER, no external crystal, no EEPROM. With this configuration·I cannot connect to the Propeller from the IDE.

When I press F7 an error message says: No Propeller chip found on any COM port.

I have tested that the USB2SER is working.

I have connected pin USB2SER RX to pin 40 on Propeller, pin TX to pin 39, pin VSS to GND, and pin RST to pin 11.
I have checked that the power regulator is giving 3.29 Volts.

Is it mandatory to have an external clock source·in order to connect through the serial port ? I suppose the Propeller is using the internal RC oscillator when no crystal is being used. Am I right ?

Am I missing something ?





▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • David BDavid B Posts: 591
    edited 2006-05-06 14:17
    According to the thread "Propeller Serial Programming Adapter - Testing"

    http://forums.parallax.com/forums/default.aspx?f=25&m=119978

    TX goes to pin 40 and RX to pin 39.

    David
  • inakiinaki Posts: 262
    edited 2006-05-06 15:15
    David B,
    you are right !!!!
    I saw the pins from the Propeller side, RX-pin 40, TX-pin 39 ! So I connected RX USB2SER to RX Propeller !!!! :-( Ohhhhh !

    Now it works: it detects a nice Propeller on COM7 !

    Thank you very much !!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-06 15:20
    Excellent -- time to blink an LED; here's a simple program:

    CON

    · LED = 0························ ' LED on P0

    PUB main

    · dira[noparse][[/noparse]LED]~~···················· ' make P0 an output
    ··repeat··························' do forever
    ··· !outa[noparse][[/noparse]LED]··················· ' toggle P0
    ··· waitcnt(clkfreq / 2 + cnt)··· ' wait 1/2 second


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • inakiinaki Posts: 262
    edited 2006-05-06 15:35
    How do I set the clock settings for the internal RC oscillator ??

    I mean, how do I set the variables:

    _clkmode
    _xinfreq




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-06 15:44
    If you're using the internal RC oscillator, you can use either of these settings:

    · _clkmode·= RCFAST··· (default when not specified)
    · _clkmode·= RCSLOW

    This setting goes into a CON block before the program code.· You don't need to use the _xinfreq setting when the internal RC oscillator is used.

    Chapter 4 of the manual (you did download it, right?) shows the various _clkmode settings.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 5/6/2006 3:58:18 PM GMT
  • inakiinaki Posts: 262
    edited 2006-05-06 16:00
    It blinks, it blinks !
    Why am I so happy because a stupid led is blinking ? :-P

    Nos, which is the minimum speed to test the video demo ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-06 16:03
    You really should be running >60 MHz for the video demo. We typically use a 5 MHz crystal with a PLL setting of 16x. I have ha 8.192 MHz crystall that I've used at 8x (~64 MHz system clock) and it worked fine. If you have a 10 MHz crystal, use PLL8X; with a 20 MHz crystal use PLL4X.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-06 16:12
    Want to have some fun with the LED blinker?· Here's a quick version that moves the blinker code·to its own cog -- this program will run 4 blinkers at one time at separate rates.

    CON

    · _clkmode· = RCFAST
    ··


    VAR

    · long· stack1[noparse][[/noparse]8], stack2[noparse][[/noparse]8], stack3[noparse][[/noparse]8], stack4[noparse][[/noparse]8]


    PUB main


    · cognew(blinkLed(16,· 1), @stack1)
    · cognew(blinkLed(17,· 3), @stack2)
    · cognew(blinkLed(18,· 7), @stack3)
    · cognew(blinkLed(19, 10), @stack4)··



    PRI blinkLed(pin, hz)

    · dira[noparse][[/noparse]pin]~~
    · repeat
    ··· !outa[noparse][[/noparse]pin]
    ··· waitcnt(clkfreq / (hz * 2) + cnt)


    A bit of explanation: The cognew method starts a new cog with the Spin interpreter and points to the blinkLed method with its parameters.· Here's the interesting bit: Even though it looks like we're using the blinkLed method four times, there is only one copy in memory (main RAM, where all Spin code lives).· This is possible because the hub grants main RAM access to one cog at a time, so each of the four cogs is using the same set of code, albeit with its own parameters and stack.· Note that the stacks are required to handle parameters and intermediate results (i.e., the calculation of the duration for waitcnt).· If you reduce the stack size to much the program will just stop.

    And what about cog 0?· After it launches cog 4 with the blinkLed method it's done and just shuts down to conserve power.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 5/6/2006 4:26:19 PM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-06 17:03
    Thanks Jon,·

    That's Great, new blinking LED codes AND with independent COGs demonstrated.· I got my Propeller to work without the EEPROM yesterday and used a 4Mhz crystal on a breadboard.

    Today, I· completed my board and managed to locally locate the 24LC256 and a 5Mhz crystal. I already·let the Propeller run overnight and all day running only on the RAM and no problem until I accidentally jiggled the power today.

    I'll try this new code on the new board and see how it all functions for another 24 hours.· I have a lot to print out and a lot to ready.· It is nice to know I can test the functionality of all 5 of my Propellers right away.

    BTW, I switched over to Gell Cells to provide ease of handling.· The only glitch is that these really need to be fused as a direct short is 4 or more amps.· Wires get hot and regulators quickly burn.· So far I burnt one 3.3 volt regulators on a momentary reversed polarity and two protection diodes rated at 1.5amp.· I have to setup and inline fuse holder [noparse][[/noparse]like the one's used under your automobile dash for a new radio]

    Fortunately, that was powering up the unpopulated board to verify my soldering.· After two years, my building technique is finally showing some improvement.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-06 18:00
    Your timed tests are for your hardware, not ours, right? You can trust that -- after eight years of development -- if you connect and code it right, it will work.

    If you're using the LM2937 make sure you've got a 0.1 uF on the input, and at 10 uF (greater) on the output -- without the output cap the device won't regulate.

    I've attached a pic of my breadboard setup -- I built this before we had the demo boards internally.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 5/6/2006 6:03:22 PM GMT
    1024 x 768 - 378K
Sign In or Register to comment.