Shop OBEX P1 Docs P2 Docs Learn Events
Questions for Chip on P2... — Parallax Forums

Questions for Chip on P2...

Cluso99Cluso99 Posts: 18,069
edited 2013-01-07 22:30 in Propeller 2
Chip:
The PARA only passes 16 bits (b16:0) with the others forced to 0. I realise this mainly conforms to the P1 with the extra bit (b16) to address 128K hub.

Is there any other reason to do this, since I presume when a hub address (or pin number) is passed, the P2 will ignore any unused higher bits?

If not, might it be better to permit a full 32 bits to be passed in PARA? This would permit the passing to be a full 32 bit parameter or a hub address with up to 15 bits of data. I cannot think of a valid reason to restrict the width to the hub address bits.

I thought this thread could be used by all to pose P2 questions, thereby keeping them in one place (at least for now).

Comments

  • cgraceycgracey Posts: 14,133
    edited 2013-01-07 20:11
    Well, the destination for the parameter is PTRA, which is only 17 bits. It would take some other mechanism to get more bits across. Also, PTRA is loaded with 17 unique bits - the bottom two are not forced to "0". PTRB, on the other hand, points to where the program was loaded from, so its bottom two bits will initially read "0".
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-01-07 22:30
    Thanks Chip. I incorrectly presumed that the PTRA was a full 32 bits and only 17 were being used. If that were the case then it may have been easy and worthwhile to let the whole 32 bits be passed.

    BTW in the ROM code PTRA is set to txpin<<9 + rxpin (may have this reversed). Of course the pins only use 7 of these 9 bits so the fact that b17 is not passed is irrelevant, but could be confusing - I went and verified that only 17 bits were passed on the DE0 emulation.

    BTW#2: What were the ROM changes?
Sign In or Register to comment.