Shop OBEX P1 Docs P2 Docs Learn Events
Wired my first microcomputer but have a problem with viewport — Parallax Forums

Wired my first microcomputer but have a problem with viewport

Thomas FletcherThomas Fletcher Posts: 91
edited 2010-03-04 18:53 in Propeller 1
I just made my first attempt at soldering up a DIP-40 propeller. I can load
programs to it both in RAM and EEPROM, but I can not get viewport to
recognize it. It will load firmware but will not connect.

I was wondering if I messed up with the crystal. Does it matter which
pin connects into XO and XI?



www.facebook.com/photo.php?pid=5064098&l=e5ed2e7788&id=830440549
«1

Comments

  • LeonLeon Posts: 7,620
    edited 2010-02-27 22:29
    No, it doesn't matter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • HannoHanno Posts: 1,130
    edited 2010-02-28 01:14
    Hi Thomas,
    ViewPort requires that the clock constants are set correctly. Ie, if you have a 5MHz external clock, then you must use these constants:
    _clkmode = xtal1+pll16x
    _xinfreq = 5_000_000 '80 MHz
    If you set the constants wrong, or use a wrong crystal, then ViewPort won't be able to communicate.
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-02-28 02:47
    The same program runs and operates with viewport using my demoboard, but not my homebrew.

    I noticed the crystal on the demoboard just says 5.00 and the crystal I ordered
    has 5.00 ECSXR. Are these the same?
  • LeonLeon Posts: 7,620
    edited 2010-02-28 05:04
    The letters look like a manufacturer's code, It just has to be 5 MHz crystal. Strictly speaking, it should have a specific load capacitance, but crystals with the capacitance recommended by Parallax are hard to find. Using one with an incorrect load capacitance will cause a slight error in the operating frequency, it doesn't matter in most applications.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 2/28/2010 5:11:18 AM GMT
  • ErNaErNa Posts: 1,752
    edited 2010-02-28 12:15
    Did you check the parallax terminal software to communicate with the propeller? Loading software, as far as I remember, is based on the internal oscillator and so works even without an crystal.

    checked it: yes, you can download without crystal installed. So, is the oscillator running? Write a little program, that loops, waits and toggles a pin. Measure the switching time with a scope, another prop board, a wrist-watch, ..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
    Hello Rest Of The World
    Hello Debris
    Install a propeller and blow them away wink.gif

    Post Edited (ErNa) : 2/28/2010 12:21:35 PM GMT
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-02-28 23:30
    Ok, so

    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000

    should be 80,000,000 cycles a second? or 400,000,000 for five seconds. I am getting close to that with a stopwatch counting for human error.
  • HannoHanno Posts: 1,130
    edited 2010-03-02 07:29
    Yup, 80M is right... Are you using pin 30,31 for serial io? Can you attach a photo of your work?
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-02 14:24
    Yes. 30,31. I used the schematic from the propeller education kit as a guide. I was wondering if the distance of
    the crystal from the propeller chip matters? I had put it farther away because I originally was thinking of
    running the daughter pins along the sides of the chip before deciding to box it up.

    The top board contains the 5 regulator with it's 16v 1000uf cap. The connection for the usb plug and a reset button
    that is unused as I moved it to the side of the box.

    The bottom board contains 3.3v reg and cap. propeller and and EEPROM with 10k resister. The crystal and a resister
    for the on led indicator.

    box-2.jpg

    Post Edited (Thomas Fletcher) : 3/2/2010 2:29:21 PM GMT
  • hover1hover1 Posts: 1,929
    edited 2010-03-02 14:37
    You need a decoupling cap (.01uF to .1uf) between VDD and VSS on each side of the Propeller chip.
    Good design dictates that the crystal should reside as close to the Propeller as·possible.

    Jim
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2010-03-02 15:53
    Can you supply a schematic?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent!
    Send $1 to CannibalRobotics.com.
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-02 17:16
    It follows the propeller education kit schematic.

    schematic.jpg

    Only intentional change was adding a switch between battery and 5 reg.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-03 17:07
    So you can load code and you can run code and the clock seems to be working because your flashing led times are right but you can't communicate with viewport even though the same code works on a demoboard.

    OK you have entered the twilight zone.

    Can you reduce the baud on viewport and see if that changes anything (sorry I can't even remember if that is possible)? Having the second board to plug your prop stick into seems a little worrying.

    Cheers,

    Graham
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-03 17:10
    p.s. I like the LED Tiki army idea in your album. I also have a respirator a bit like that, it blocks dust and solvents only it is a really cheap one. One side blocks dust, the other solvents [noparse];)[/noparse]
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-03 18:09
    The tiki army will work like this when completed: www.facebook.com/video/video.php?v=326653910549

    I needed the pin box, because the tiki project required 21 pins to run the 49 lights using 3 to 8 Line Decoders.

    On the pin box, I moved the crystal closer, but haven't tried the decoupling caps yet. I have since moved the pins for
    the usb plug connection to the back of the box. This allowed me to cut the first board down to a third of it's size.
    If I had initially moved the propeller over one column I might of been able to get the 5 reg on the same board.

    Still a no-go with viewport.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-03 18:35
    Have you tried reducing the connection baud?

    As far as I can see everything viewport needs is working, a crystal and the serial link because you have shown the propeller can be programmed and that the clock frequency is correct.

    Therefore the problem must be a difference between the serial comms used for programming and using viewport. Perhaps a higher baud rate in viewport is highlighting a problem with the layout or soldering of the circuit that the programming can tolerate.

    Graham
  • hover1hover1 Posts: 1,929
    edited 2010-03-03 18:49
    Can you try a simple program to see if the Propeller can transmit data back to the PC?

    You would open the Propeller Serial Terminal at 57,600 Baud.

    Jim


    Post Edited (hover1) : 3/3/2010 6:54:30 PM GMT
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-03 19:02
    Viewport is set at 115kbps....I can't remember why. Version I purchased? I tried uploading firmware
    at that speed and also 1 and 2 mbps. It seems to load but when it tries to connect it says it can't
    identify device, even though it recognizes the propeller when I reset/identify hardware under configuration.

    I don't know how to transmit data back to the PC without viewport.
  • hover1hover1 Posts: 1,929
    edited 2010-03-03 19:18
    Thomas,

    Dowload the program I attached to the Propeller board. Run the Parallax Serial Terminal and set the baud rate to 57,600. You should see "This is a test message" on the screen, updated about 1 per second.

    Jim
  • LeonLeon Posts: 7,620
    edited 2010-03-03 19:22
    Parallax Serial Terminal Demo? You should have it in the Library folder.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-03 19:27
    I didn't get the program when I installed the propeller tool, but I downloaded it (nice to learn something new for me anyway) and
    ran HelloFullDuplexSerial.spin

    I get the test message repeating at 57,600. All other rates seem to be gibberish.
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-03 19:35
    Ok, going up on the baudrate in HelloFullDuplexSerial.spin and changing in the serial terminal to match the highest I could
    go and still get message was 1 000 000

    Is that normal or should I be able to go higher?
  • hover1hover1 Posts: 1,929
    edited 2010-03-03 20:07
    Thomas,

    The file should be included in Propeller Tool 1.2.7. File>Open From>PEKit Examples>Object Labs.

    I was just trying to establish a baseline as to your ability to receive data. Baud rate does not matter at this point.

    What version ViewPort are you using? I am testing on Version 4.2.7.

    This just in.
    You may not be going crazy!
    I just did some tests with ViewPort to my Demo Board. All works fine.

    Trying the same tests to a know working Proto Board, (my GPS Data Logger), I can identify the Propeller chip, but I can't run any tutorial programs. "Unable to connect. Error on Com 2. No configuration found." I tried to reconfigure port configurations in ViewPort, but symtoms did not change. The difference between the Demo Board and the Proto Board, I was using the PropPlug on the Proto Board.

    Proto board #2. Bare bones Proto Board, non USB, using the same PropPlug. All tests good with ViewPort. Now I'm confused.

    We may have to take this over to the forums at Hannoware.com. It take that back, it's a Parallax product.

    I have two more Proto Boards to check. And also I might roll back to a previos version of ViewPort to see what happens. It may take a while, I have some overseas ebay shipping to do. (I hate customs forms!).

    Jim
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-03 20:21
    My viewport is 4.1.503

    I would download upgrade, but will wait to see your results.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-03 22:01
    Thomas,

    your experience with full duplex is the same as I get with my propdongle so it would seem that there is not a problem with your serial link at least when transmitting out of the board.

    So in the style of Sherlock Holmes I have decided there is a slightly dry joint of partially broken wire between pin 31 and the prop-plug or a poor quality connection between the plug and the pins or a bad USB cable even.

    I'm finding it hard to believe there is something wrong with viewport or the propplug in general causing this issue and I think it is unwise to draw too many conclusions from Jim's tests because in past experience there is always more than one way for things not to work.

    Let me know when you have fixed it.

    Graham

    p.s. Tongue in cheek but do check out the connections [noparse]:)[/noparse]
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-03 22:24
    I just did some further tests, it seems that Viewport will not work when you are on day 101 of the 30 day trial, doh!

    Graham
  • hover1hover1 Posts: 1,929
    edited 2010-03-03 22:28
    Graham and Thomas,

    I ran out of time to do any more tests after my last post. It was a preliminary test. I intend to testing on 3 more Proto Boards.

    Version 4.1.503 is supposed to be stable so I will downgrade and report back.


    Graham Stabler said...
    Thomas,



    I'm finding it hard to believe there is something wrong with viewport or the propplug in general causing this issue and I think it is unwise to draw too many conclusions from Jim's tests because in past experience there is always more than one way for things not to work.



    Graham


    I agree,

    Jim
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-03-04 00:27
    Tried a different usb cable. A different port on the computer. I soldered a new wire from connection pin to pin 31. still no go.

    But the more I look at this serial terminal it really does what I used viewport for. I only used viewport to view variables and debug code.

    It really was more program then I needed.

    Is there a tutorial for sending ascii characters to control screen position? It looks like I could use it to display data in a more flexible format.

    And is there a program that writes a log of the serial data? Even though it sounds like a great way to burn a hole in the harddrive, it would be
    cool to have the propeller creating a delimited text file that could be linked into Excel or Access.

    Back in the DOS days there use to be a program that created a virtual disk in memory.......hmmmm
  • HannoHanno Posts: 1,130
    edited 2010-03-04 04:27
    Hi Guys,
    Sorry, been coding instead of checking forums- looks like I missed a bit.
    You should definitely use the latest ViewPort- you can check here for the latest version(currently 4.2.7):
    http://hannoware.com/viewport/updates.php
    You can also "Check for Updates" inside of ViewPort...

    Here's what happens when you click "Run" in ViewPort:
    - ViewPort uses the "Propellent" library to look for a Propeller on a port whose USB ID is not "PropScope"
    - ViewPort uses the "Propellent" library to compile and load the Propeller- and then starts your chosen spin program
    - The spin program should include the "Conduit" object and be configured with timing constants that match your hardware.
    - The spin program will start transmitting configuration data at 115kbps to the PC
    - The PC listens on the port for this configuration data- once it finds it, the connection has been established.

    Here are common problems people have had:
    - Wrong timing constants for their hardware
    - Bad USB cable- the unshielded, retractable USB cable that came with the PropPlug was especially bad
    Use a short, shielded, standard USB cable
    - Complex USB setups with multiple USB routers/devices
    - Very slow PC's, or under emulation on Linux/Mac

    We'll get this fixed...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-04 10:01
    Hanno, from his comments that it works on a demoboard I think that rules out software within viewport and on the propeller so it seems it must be some electrical issue with regards to the serial link.

    Thomas, it looks like you have mounted a socket on your board into which you have plugged some headers into which you have plugged your prop-plug. Even if it is only for a test I would recommend soldering a header as close to the propeller as possible for the soldering to avoid the stacking of connectors and trailing leads.

    If you want to do some more general debugging you may also like Propterminal this can be used as a drop in replacement for TV text but without the need for a TV. You simply include the PC_text object instead of the TV_text object and run the little terminal program, that let's you position cursors and clear the screen etc.

    Hopefully we can get this sorted so you can have all options open to you.

    Graham
  • SapiehaSapieha Posts: 2,964
    edited 2010-03-04 10:50
    Hi Thomas Fletcher

    Never had problems with Viewport - IF XTal have ben specified correctly in my program and Viewport was initiated to correct comunications speed.
    I run in time all versions of Viewport that Hanno have write both that ones that not had posibility to change XTal parameters and after my IDEa he has revrite Conduit to suport all Frequencise (No problems with Communication with any of them if my XP was stable) but had some problems with XP that give me communications problems BUT that was automaticaly on all type of programs that communicates with Propeller.

    I run many types of boards and many of them are my own Layouts.

    One thing to consider is stablity in XTal functioning - Good decopling caps, good Voltage without transients else riple.
    BUT that is even needed to correct functioning of propeller - That is one Micro that have variable Curent consumption that give good Design first priority to function correctly.

    Regards
    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
Sign In or Register to comment.