Shop Learn
SPI SOLVED - Page 5 — Parallax Forums

SPI SOLVED

1235711

Comments

  • Please check and see if any problems in transmission.
  • At a quick check your values for direction are not working
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-08-12 01:23
    @bbrien - if you clean up and post your schematic, I can post super simple code that will work.

    bob, this is the screenshot of the indentation problem. Obviously the code that you sent is not the same code that you are running or else those first few lines are all that you expecting to run as a test. I looked at the serial object and it does a stop before a start so that is taken care of, but restarting glitches the I/O lines for (re)starters anyway. Your coding is a mess. If you want to help bbrien then remove all the junk. It seems that maybe you hacked the code just for a simple test but it would have been easier just to have a separate file. btw, there is no waitcnt in your start12 repeat loop so it will be restarting and transmitting continually.

    |===========================================================================|
    Spin Block start12 with 0 Parameters and 0 Extra Stack Longs. Method 3
    PUB  start12
    
    Local Parameter DBASE:0000 - Result
    |===========================================================================|
    148                          Repeat
    Addr : 0266: Label0004
    151                             ser.start(21, 20, 0, 9600)
    Addr : 0266:             01  : Drop Anchor   
    Addr : 0267:          38 15  : Constant 1 Bytes - 15 - $00000015 21
    Addr : 0269:          38 14  : Constant 1 Bytes - 14 - $00000014 20
    Addr : 026B:             35  : Constant 1 $00000000
    Addr : 026C:       39 25 80  : Constant 2 Bytes - 25 80 - $00002580 9600
    Addr : 026F:       06 0A 01  : Call Obj.Sub 10 1
    153                             SerTest2:=SerTest2+2
    Addr : 0272:       C8 84 80  : Memory Op Long VBASE + READ Address = 0480
    Addr : 0275:          38 02  : Constant 1 Bytes - 02 - $00000002 2
    Addr : 0277:             EC  : Math Op +     
    Addr : 0278:       C9 84 80  : Memory Op Long VBASE + WRITE Address = 0480
    155                              if SerTest2 >99
    Addr : 027B:       C8 84 80  : Memory Op Long VBASE + READ Address = 0480
    Addr : 027E:          38 63  : Constant 1 Bytes - 63 - $00000063 99
    Addr : 0280:             FA  : Math Op >     
    Addr : 0281: JZ Label0007
    Addr : 0281:          0A 04  : jz Address = 0287 4
    156                                 SerTest:=0
    Addr : 0283:             35  : Constant 1 $00000000
    Addr : 0284:       C9 84 7C  : Memory Op Long VBASE + WRITE Address = 047C
    Addr : 0287: Label0007
    Addr : 0287: Label0008
    158                              if SerTest >100
    Addr : 0287:       C8 84 7C  : Memory Op Long VBASE + READ Address = 047C
    Addr : 028A:          38 64  : Constant 1 Bytes - 64 - $00000064 100
    Addr : 028C:             FA  : Math Op >     
    Addr : 028D: JZ Label0009
    Addr : 028D:          0A 04  : jz Address = 0293 4
    159                                reboot
    Addr : 028F:          37 06  : Constant Mask Y=6 00000080 128
    Addr : 0291:             35  : Constant 1 $00000000
    Addr : 0292:             20  : ClkSet(Mode, Freq)
    Addr : 0293: Label0009
    Addr : 0293: Label000A
    160                             ser.Putlong(SerTest2)
    Addr : 0293:             01  : Drop Anchor   
    Addr : 0294:       C8 84 80  : Memory Op Long VBASE + READ Address = 0480
    Addr : 0297:       06 0A 15  : Call Obj.Sub 10 21
    164                              EW_Val:=ser.Getlong
    Addr : 029A:             00  : Drop Anchor Push 
    Addr : 029B:       06 0A 14  : Call Obj.Sub 10 20
    Addr : 029E:       C9 84 88  : Memory Op Long VBASE + WRITE Address = 0488
    165                              NS_Val:=ser.Getlong
    Addr : 02A1:             00  : Drop Anchor Push 
    Addr : 02A2:       06 0A 14  : Call Obj.Sub 10 20
    Addr : 02A5:       C9 84 8C  : Memory Op Long VBASE + WRITE Address = 048C
    Addr : 02A8: Label0005
    Addr : 02A8: JMP Label0004
    Addr : 02A8:       04 FF BB  : Jmp 0266 -69  
    
    so this repeats before it waitcnts
    Addr : 02AB: Label0006
    168                          waitcnt(clkfreq/10 +cnt)
    Addr : 02AB:             35  : Constant 1 $00000000
    Addr : 02AC:             C0  : Memory Op Long POP Address READ 
    Addr : 02AD:          38 0A  : Constant 1 Bytes - 0A - $0000000A 10
    Addr : 02AF:             F6  : Math Op /     
    Addr : 02B0:          3F 91  : Register op CNT Read
    Addr : 02B2:             EC  : Math Op +     
    Addr : 02B3:             23  : WaitCnt(count)
    
  • I made corrections and notes now you will see 1 or 0 for Direction in the serial terminal.
  • The slave program was only a quick hodge-podge I just used it for the serial illustration. The analysis is look great but means nothing for this project. This Master and slave program where only a quick example of the master sending a few little endian bytes to the slave and showing them on the slave terminal. For that purpose it WORKS!!!!!!!!!!!!!, 'epya, funktioniert,
    trabajos, werken, travaux, Arbetar,
  • I am using the Propeller Tool v1.3.2 and its serial terminal and a propeller project board and I get no display on the terminal.I have two 10k resistors on the P10 and P11 Pins and they are connected to the two props,tx-rx and rx-tx, tx = 3.3v and rx = gnd
  • Ok great, which prop are you trying to read serial on, the one with the master program or slave. Did you check your com port, baud etc. I always check my prop for com. By hitting F7 on the keyboard.
  • What works for me or you does not help someone if it is messy, cluttered, incorrect, and poorly documented and labeled. So there is no need to !!!!! as if it is successful. To be successful it needs to work for bbrien too, so make it clean, uncluttered and simple.
    btw, there was no "analysis", this was just the output of the compiler confirming your repeat indentation didn't cover the waitcnt which would slow it down enough to follow. Messy, messy, messy.

    But since he has not updated and checked the schematic, and checked he has posted it correctly etc, I see no reason to bother anymore until he does.
  • Jakacki you seem like an intelligent fellow, but on this project I have not seen any working code come out of your camp. I can tell that you have not loaded these programs into two props, wired them together and tested them. So your are incorrect in stating that I'm not helping, It's more like I'm the only one helping.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-08-12 03:34
    DigitalBob wrote: »
    Jakacki you seem like an intelligent fellow, but on this project I have not seen any working code come out of your camp. I can tell that you have not loaded these programs into two props, wired them together and tested them. So your are incorrect in stating that I'm not helping, It's more like I'm the only one helping.

    Since we are "intelligent" people please don't take it personally. I've just seen this whole bbrien thing in various threads drag on and on and on. Obviously he needs special help, not just any help. So what you have working is commendable, for yourself that is. I am busy designing a suite of P2 boards anyway although I did write some code already that is way simpler, although I am not inclined to waste any further time with actual hardware.
    If though you are making assumptions about how bbrien has it hooked up and he is just using your code as is, then that is not helping (even though everyone is trying to help). This is why he needs special help but until he actually provides the actual real as-it-is schematic/wiring/mud-map and actual real clear photos of the board and wiring, we are just wasting our time and making it look like that the forum help is not working which reflects poorly on the forum itself. This is not the case though as we know how to make it work, but once again, bbrien needs special help if we can ever get him to provide the actual information properly and then get him to apply the help properly as well.
  • Trust me I have better things to do than dabble on this telescope project. Our OP just seems to have an issue with transmitting some simple bytes from one prop to another. So I have seen your P2 board and it looks pretty good. I just waiting for a P2 tool to come out. The flex GUI is a little simple. My suggestion to Parallax would be to come out with a nice tool for P2 like the P1, pack it full of quick easy spin2 examples in the library. So any average Joe could buy a P2 load an example and say wow look at me.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-08-12 04:19
    DigitalBob wrote: »
    Trust me I have better things to do than dabble on this telescope project. Our OP just seems to have an issue with transmitting some simple bytes from one prop to another. So I have seen your P2 board and it looks pretty good. I just waiting for a P2 tool to come out. The flex GUI is a little simple. My suggestion to Parallax would be to come out with a nice tool for P2 like the P1, pack it full of quick easy spin2 examples in the library. So any average Joe could buy a P2 load an example and say wow look at me.

    I'm with you there! Once we see know how he has wired it for real, we should be able to give him code that we know will work without him messing with it.
    If you can elaborate on what you would like with the P2 tool, then I'm sure that this helps Parallax and others formulate what would be "a nice tool" :) Me? I just use my TAQOZ so I don't have any need for these tools :lol:
  • I know there is a P2 beta tool out, I have not tried it. The P1 tool is pretty good. You need to have a good library of example demos. For hdmi , vga etc. USB keyboard, USB mouse etc. . I'm just not a fan of this Tachyon. You need to appeal to the masses, your not going to make any money on a handful of forum nerds buying chips that you can almost only program spin and assembly. The reason why arduino took off was a good library of C projects and press on shields. That made the average idiot a "C" programming genius .
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-08-12 11:44
    DigitalBob wrote: »
    I know there is a P2 beta tool out, I have not tried it. The P1 tool is pretty good. You need to have a good library of example demos. For hdmi , vga etc. USB keyboard, USB mouse etc. . I'm just not a fan of this Tachyon. You need to appeal to the masses, your not going to make any money on a handful of forum nerds buying chips that you can almost only program spin and assembly. The reason why arduino took off was a good library of C projects and press on shields. That made the average idiot a "C" programming genius .

    I have mentioned many times on the forum that I don't ever expect to appeal to the masses since I am only sharing what I do which is very useful for my commercial products. If it works so well for me, it could be useful for anyone who takes the time to try it. The telescope code in Tachyon is so super simple and uncluttered and if the proper wiring information is available then I could send him the one binary that would work for either Flip automatically. Once it is working then doing the same thing in Spin or C is much easier because you know the hardware works, and how to go about it in software. One of the interesting things about Tachyon is that it has practically all the drivers and software that you could think of built-in and running on the P1 with memory to spare and without having to link in libraries at PC compile time. In fact you can run it up from the terminal anytime you like.
  • What's the price for your P2 board? and do you have any in the US? I might be interested in a few. Your P2 might be a good choice for our telescope friend here.
  • Speaking of telescope are you having any luck with the serial.
  • DigitalBob wrote: »
    What's the price for your P2 board? and do you have any in the US? I might be interested in a few. Your P2 might be a good choice for our telescope friend here.

    I will be handling US shipping. You will need to pay Peter in his signature. I will get a bulk shipment to me and then send them out to North America customers.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-08-12 16:36
    Publison wrote: »
    DigitalBob wrote: »
    What's the price for your P2 board? and do you have any in the US? I might be interested in a few. Your P2 might be a good choice for our telescope friend here.

    I will be handling US shipping. You will need to pay Peter in his signature. I will get a bulk shipment to me and then send them out to North America customers.

    I am so close to sending these off to fab. The P2PAL with the ESP32 is a good option and I can see that in the future, and once the design is frozen, the P2D2 may become a 4 layer pcb with the P2PAL section on the reverse (which becomes the top when it is plugged in). The USB-C connector can also connect to HDMI monitors. Maybe by that time Parallax may take up manufacture of these things.

    @DigitalBob - I can't see the need for a P2 for the telescope drive since the P1 can do this so easily. Tachyon has all kinds of high-speed serial stuff built-in and also a 32-channel PWM, but that's only scratching the surface.
  • Ok what's the USD pricing. I already have the P2 eval, P2 eval. accy. etc. Let me know while I'm still in a spending mood. I'll send you a paypal if it's in my budget.
  • DigitalBob wrote: »
    I know there is a P2 beta tool out, I have not tried it. The P1 tool is pretty good. You need to have a good library of example demos. For hdmi , vga etc. USB keyboard, USB mouse etc. . I'm just not a fan of this Tachyon. You need to appeal to the masses, your not going to make any money on a handful of forum nerds buying chips that you can almost only program spin and assembly. The reason why arduino took off was a good library of C projects and press on shields. That made the average idiot a "C" programming genius .

    Actually it left the average idiot and average idiot pretending to use/understand C language. Depending on whose version of history you believe, it enabled the average artist/maker/etc able to bolt together software "parts" into a working thing, artwork, prop, project, etc without having to really understand C as long as they could find a part close enough to what they wanted or could understand just enough to beat into submission. A premise which may fit the progression of the telescope saga. Given the popularity of the Arduino and its genetically related cousins, that works well enough for the masses using them. The prop is the same way with the OBEX (an argument for another ongoing thread) which allowed for a growing collection of user contributed objects that others could fold spindle and mutilate into whatever they wanted. Kinda like using "scripts"? But C programming genius? No, Not even on their best day for most.
  • I'm still waiting on telescope man to chime in on his progress or regression
  • DigitalBob wrote: »
    I'm still waiting on telescope man to chime in on his progress or regression

    You sure like waiting. I hear Halley's comet will be back in just 41 years. OP maybe sooner, but at least the comet will be more discernible.
    All he has to do is take a few more minutes to prepare his question and provide some up-to-date and pertinent information, and then check that it is correct before posting.
  • Have you come up with a target price for your P2 board yet, not sure if I missed it.
  • Price is still the same which I think was $75 USD and with the P2PAL option attached (with HyperRAM, ESP32, USB-C(HDMI) and extra microSD) that would add around another $40 I'm guessing although I need to confirm that. Once I get some volume and automated assembly happening I'd expect the prices to be coming down. This is a cost-plus operation, I'm not doing it for profit, I'm doing it as a Parallax community project but I don't want to be buried by the certain losses that stem from development, revisions, boms and production etc.

    Don't forget that there is P2LAB, a dev board for the P2D2 with all kinds of connectors and options and also fits into an enclosure if you want. It also has room for a target P2D2 or custom board.
  • DB and Peter, please break out the P2 stuff to another thread. That way I can follow and decide when (not if) I will get into P2 and which boards. Don't want that info lost in all the slag.
  • It takes me time to do these things as I don't function to well when I shake so much but this is thee best I can do with the schematics
    2550 x 3300 - 613K
    2550 x 3300 - 501K
  • So the schematic with the pushbuttons will be your master is that correct?, with serial on pins 20,21. I think I mention before not to use one resistor for four led's. And the slave board is the one with the motor connectors, with serial on pin 10,11. What signals do you expect to see on the other RJ connectors?
  • The project board is the slave for my testing setup
  • Which one is the project board? The hand control schematic
  • The flip runs the hand control schematic.I think it may not be transmitting since the serial cog is doing the work. I get a display on the serial terminal.If I connect the txPin to The slave Serial Tx pin the blue LED flashes
Sign In or Register to comment.