Recent content by Aries

  1. Aries

    spiin versus bit-banging

    Fundamentally, it looks like "no change". I've printed out the values for all four modes, and then the value of the mode selected. The results are in order SPIMODE00, SPIMODE01, SPIMODE10, SPIMODE11. SPIMODE00=64 SPIMODE01=0 SPIMODE10=80 SPIMODE11=16 Started 64 PATABLE Write 0F=0,0,15 PATABLE...
  2. Aries

    spiin versus bit-banging

    Hippy, Thanks for your further thoughts. I tried SPIMODE10 and got some odd results - the READs are consistent (albeit wrong), the WRITEs are 07 or 00, but the pattern is not consistent and is different for each time the Picaxe is powered up. SPIMODE00 and SPIMODE11 seem to give the right...
  3. Aries

    spiin versus bit-banging

    The results are: Original version (pinMOSI set first) Started PATABLE Write 0F=0,0,15 PATABLE Read 0F=0,0,15 : 0F 0F 0F 0F 0F 0F 0F 0F Second version (pinMOSI set after) Started PATABLE Write 0F=0,0,15 PATABLE Read 00=0,0,0 : 01 23 45 67 89 AB CD EF
  4. Aries

    spiin versus bit-banging

    How do you feel about 2F? Started PATABLE Write 0F=0,0,15 PATABLE Read 2F=0,2,15 : 2F 2F 2F 2F 2F 2F 2F 2F The reason, I think, is that it is indeed picking up 35 - the problem is that register 35 is read-only, so you just get back the current value. Using the "old" TxRx to define the...
  5. Aries

    spiin versus bit-banging

    Hippy, I used your code with a power-down/up and it worked for SPIMODE00 and not for SPIMODE01. I've gone back to my earlier sample code as well, and cycled through all the modes, using hspiin and bitbang to read the data back. Oddly, SPIMODE00 and SPIMODE11 both work, but the others don't...
  6. Aries

    spiin versus bit-banging

    Hippy, Thanks for doing more research. I've been busy on other things so not much time to test. However, I can report that your code with HSPI does work for SPIMODE00 - I've not checked other things. In my earlier post, I cut down the original code (which behaved oddly for SPI) and omitted...
  7. Aries

    spiin versus bit-banging

    Thanks for the thought - it is running 20X2 vC.3
  8. Aries

    spiin versus bit-banging

    Hippy, Thanks for spending time on this - much appreciated. In answer to your first point - I have tried two 20x2, with the same results. I have also tried SPI and HSPI with an NRF24L01 and both work as expected. So it does look as if there is something with the CC1101. I've tried your code...
  9. Aries

    spiin versus bit-banging

    Thanks for the info, Hippy. I must be missing something very obvious, but at the moment, I can't even get hspiout to write, let alone read anything. The code below does an SPIOUT and the eight possible HSPIOUTs. The output section of the code is the same as before, but I'm only using the...
  10. Aries

    spiin versus bit-banging

    My previous experience of HSPI was not successful, hence my hesitation in using it. You suggested using HSPIOUT and PEEKSFR to get the two-way SPI needed for the first 8 bits. Having never had to resort to PEEKSFR, could you give me some guidance (eg, what do I PEEK)? The alternative would I...
  11. Aries

    spiin versus bit-banging

    Here is the datasheet for the CC1101: http://www.ti.com/lit/ds/symlink/cc1101.pdf (although I confess mine came from China). I've put together a short test routine to read using bit-banging plus Pre and Post, High and Low, Normal and NOTted. Bit-banging works, the others mostly do not, although...
  12. Aries

    Is Hserin really this slow?

    I'm not sure that sertxd(w1) would show the characters correctly anyway. b2 = "A" b3 = "B" sertxd(#w1,".") sertxd(w1,".")gives 16961.. - i.e. w1 has "AB" but prints nothing because it is not a printable character. You could try sertxd(b2,b3) instead, but unless you know you have had exactly 2...
  13. Aries

    spiin versus bit-banging

    As a postscript - it seems that using MSBPre_H inverts the meaning of SDA, so the result has to be NOTted ... high SCK spiin SCK,MISO,MSBPre_H,(b1) b1 = NOT b1 This is (at the moment) giving the desired results in terms of correctness and speed. As always, thanks for the...
  14. Aries

    spiin versus bit-banging

    Thanks for the thoughts - I will experiment a bit further. Meanwhile, a bit of good news: using your idea of "reversing" the clock, I think I have made spiin work by using high SCK spiin SCK,MISO,MSBPre_H,(b1) and only dropping SCK when the CC1101 is not enabled (CSN high).
  15. Aries

    spiin versus bit-banging

    I'm testing this with a 20X2, although I will probably need a 28X2 in the end (more memory). I have already unrolled the loop in places, as in your first example. I didn't think of reversing the clock to use pulsout. There is an added complication as well - there are cases where you need to...
Top