Shop OBEX P1 Docs P2 Docs Learn Events
I should be getting 500_000 but I'm getting random numbers — Parallax Forums

I should be getting 500_000 but I'm getting random numbers

krazyideaskrazyideas Posts: 119
edited 2009-08-28 19:55 in Propeller 1
Hello.

I have two propellor chips that I am working with.
I am trying to create a pulse with one chip and feed it into the other chip. The Problem is that I should be getting 500_000 because that is how long the pulse is, but I am getting all kinds of numbers, from 1360 to 670_000. It should be constant shouldn't it?

I made these two programs as simple as I could, thinking I was messing up somewhere. But they are still doing the samething and I can't figure out how to fix it.

I was thinking that mabe I needed a pull down resistor to stabalize the pules going from pin 2 of the sender and into pin 2 or reader. But when I put a red black brown gold resistor from pin 2 to ground it wouldn't do anything.

The program in chip #1 that is sending is called send, and the program in chip #2 that is reading is called read.
Oh and I both chips hooked up to the same power supply through the PDB

I'm stumped
any thoughts out be great
Thanks

Comments

  • photomankcphotomankc Posts: 943
    edited 2009-08-28 17:54
    Does the number change with each screen update or does it stay constant across each run of the program?
  • krazyideaskrazyideas Posts: 119
    edited 2009-08-28 18:12
    The number changes with each screen update.

    I have the chips mounted in a bread board. could I have a bad socet on the crystal made? They feel tight so I don't think so, but could that be an option?
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-08-28 18:45
    how about send and read on the same chip ?

    best regards

    Stefan
  • krazyideaskrazyideas Posts: 119
    edited 2009-08-28 19:01
    I switched which chip #1 from the reading program from the sending program, and chip #2 from the sending program to the reading program and it started working perfectly. So I switched the programs back to the way they were and now the number only changes from 50_000 to 49_984 and back up to 50_000.
    I did this several times and everytime I it worked perfectly when one way and had an error of 16 counts when it was the other way.

    I don't know what is happening between the two chips. I can live with an error of 16 counts but whats the deal. It works perfect when chip #1 is the reader but not when chip #2 is the reader. And why in the world when I switched which chip did what, It is some how magical got a whole lot better but not just reloading the programs?

    Any thoughts, because that was really wierd
    I am worried about it reverting back to not working when I am in the middle of working other bugs out
    Thanks
  • photomankcphotomankc Posts: 943
    edited 2009-08-28 19:26
    Breadboards suck. A few things that I would try:

    - Lower your clock speed. Try PLL8x
    - Different pins of the chip.
    - Send and receive on the same chip. Run that on both chips.

    I had one on a breadboard that would not, absolutely not run correctly at 80MHz. Nothing would fix it, no amount of bypass moving it to new positions on the board, nothing. My RCTime circuits all showed lot's more noise as well. On a soldered protoboard they vary by 1 microsecond or so on the breadboard 15 microsecond variation was pretty standard.
  • krazyideaskrazyideas Posts: 119
    edited 2009-08-28 19:55
    Ok
    That sounds like a plan to me. I never knew that a bread board was so crappy.
    I'll try some of those other things to

    Thanks
Sign In or Register to comment.