Search results

  1. Tady

    Teensy 4.0 quad output question

    Thank you for a fast reply. I also have a 3.6... Hmm how about two shields and one DAC?
  2. Tady

    Teensy 4.0 quad output question

    Hello Before I dive in to buying two audio shields I would like ti know if it is possible to get two inputs and five outputs. I know that quad outputs are possible but I would need one more. I would like to make a digital crossover filter. Stereo Tweeter output, stereo mid range output and...
  3. Tady

    Two bytes to floating point number

    How about this: ULone = (((data[0]&0xf)<<16)| data[1])/(pow(10,((~(data[0]>>8)&0xf)+0b01)));
  4. Tady

    Two bytes to floating point number

    ULone = ((data[0]<<8)|data[1])/(pow(10,((uint16_t)(~(data[0]>>8)+0b01)))); Should this be the correct calculation.. I didn't test it I think that the calculation inmy previous post works because I didn't go over very large numbers and so it doesn't affect anything since the MSB's are always 0
  5. Tady

    Two bytes to floating point number

    Currently I am using this method : ULone = data[1]/(pow(10,(((uint16_t)(~data[0]+0b01))/256))); and if data[0] = 65024 data[1] = 4616 i get: ULone = 46.16 The results are all correct so it seem it is the right approach
  6. Tady

    Two bytes to floating point number

    Sorry not right now. I need to re-program the microcontroller but I assembled it inside the analyzer :(
  7. Tady

    Two bytes to floating point number

    @defragster I will try your method in the morning so I can see and learn. But I did a quick test with nerofun's post and it works perfectly. I don't know why this method is used (i didn't com across it after tons of googling) but it seem that this is the case here. But I will thy the union...
  8. Tady

    Two bytes to floating point number

    It's an Iskra MC666 netwok analyzer. I couldn't ind any data regarding the modbus communication. They do provide windows software for configuration anl live data view. Nothing more. I sniffed the bus and got the register locations but that is about it.. I think neurofun is on th right track...
  9. Tady

    Two bytes to floating point number

    @neurofun I think you are right! 2's complement of 65024 is 512 and if I divide by 256 i get 2 2's complement od 65280 is 256 and if I divide by 256 i get 1 How can I calculate the 2's complement I used an onlinecalculatur for this :) invert all 1'sand 0's and add 1?
  10. Tady

    Two bytes to floating point number

    Hmmm.. I will try unon in the morning but i think it will not work. I did some digging and I think I asked the qustion wrong. I don't get two bytes but I get two Ints. And I don't know how the uion function is going to work since the secod int already gives me the exact number only without the...
  11. Tady

    Two bytes to floating point number

    Hello I have a nework analyzer that uses modbus communication. Now I have a problem reading the measured value. It seems the meter is using two 16bit bytes for each value. Currently I'm trying to read only Power So if the measured power consumption is less than 1000W, say 136.71W the first...
  12. Tady

    Teensy 3.x library for tick timer?

    I will try with T3.2 i think it will be great. I bouth a 4.0 and I still don't know what to use this beast for🤣 except blik a LED :D
  13. Tady

    Teensy 3.x library for tick timer?

    Thank you! Didn't know that F_BUS returns the value :) but as Paul said the Library is limited to 36 if I understand correctly. I did some calculations and I think I need abou 170ns resolution. But with 36MHz in theory i can go 27ns?
  14. Tady

    Teensy 3.x library for tick timer?

    How much if F_BUS on Teensy 3.2 overclocked to 120MHz?
  15. Tady

    Teensy 3.x library for tick timer?

    Ufff thank you so much.. I missed that part of the description! Thank you!!
  16. Tady

    Teensy 3.x library for tick timer?

    Hello. I am looking in to how to use the timers on Teensy 3.x to specify ticks instead of microseconds (IntervalRimer). I need to port some AVR code that uses compare match but it needs to go below 1 microsecond so I can't use IntervalTimer Thank you
  17. Tady

    Teensy 3.6 + wiz820io NTP example problem

    I fixed it! After some digging I noticed that my setup was incomplete.. I was only assigning the mac and IP... I needed to assign gateway, subnet and DNS... So the teensy can access the outside world ... Stupid me!! Ethernet.begin(mac, ip, dns, gateway, subnet); Thank you anyway for taking...
  18. Tady

    Teensy 3.6 + wiz820io NTP example problem

    Hello everyone! I'm havingsome problems with the NTP example. If I use the provided example everything works fine. The sketch sends a UDP request to the time server and I get a correct response. But if I assign a fixed IP it stps working even if I assign the same IP that the router has...
  19. Tady

    Using the DAC with DMA on Teensy 3.1

    Hello! I have a question. I would like to use your code for generating a sinewave for a resolver excitation. Is there any way that I could implement a interrupt that would fire when for example the DAC reads the 32 entry (or any other entry by my choice) in the LUT and execute an ISR? Thank you!
  20. Tady

    Teensy 3.x multithreading library first release

    Wow now thats what I call a reply! Thank you so much it works:)
  21. Tady

    Teensy 3.x multithreading library first release

    Hello! Can I just ask a noob question? I'm using the multithreading library for a small project. I'm runnig the accelstepper library in one thread and I'm passing the position data from another thread. I was looking at the library webpage and I cant wrap my head arount the mutex locks and how...
  22. Tady

    Teensy 3.0 as SPI Slave

    @btmcmahan may I ask why is this part of the code written like this: void T3SPI::rxtx16(volatile uint16_t *dataIN, volatile uint16_t *dataOUT, int length){ dataIN[dataPointer] = SPI0_POPR; dataPointer++; if (dataPointer == length){ dataPointer=0; packetCT++;} SPI0_PUSHR_SLAVE =...
  23. Tady

    DMA slave mode teensy 3.6

    What are those boards doing? Nice shields:) yeah... It would work only one way... But the teensy is returning actual position data... Rpi sends wanted position data and the teensy returns actual position :) besides position data the rpi sends data for outputs and teensy sends back status of...
  24. Tady

    DMA slave mode teensy 3.6

    Man I really love you explanation but unfortunately i don' know what to do with the info :) i was reading some other threads and someone was explaning that there was a bug in the silicone... To me all this info seems like it's not doable... Atleast a relaible communication... This thing I'm...
  25. Tady

    DMA slave mode teensy 3.6

    Hi I have tried multiple examples.... This code is from a user here one the forum named WMXZ and i had no luck with this one.. Alot of garbage if i tried copying the recieve buffer to another "holder" for further data manipulation.... I get data but it's not consistent.. It shifts alot...
  26. Tady

    DMA slave mode teensy 3.6

    Lower clock speeds improved the operation but even at 1MHz i had problems... can you give me an example for 8 bitDMA slave? I need it to recieve and send back ... data is 8bits and 20bytes long, if it's a problem i can shorten it to 10 bytes :) Raspberry sends 32bits long so on the slave side I...
  27. Tady

    DMA slave mode teensy 3.6

    How do you mean entirely? I use the 8bit rxTx example.... I was looking at the source and to me it seems that interrupt is driven by the clock pulse. When the interrupt fires the ISR reads the popr register and the it writes to the pushr register...
  28. Tady

    DMA slave mode teensy 3.6

    I'm already using this library. It works.. But its loosing sync.. Sometimes it works for half an hour sometimes more sometimes less... And always fails if i restart the teensy or RPI... It looks like the data from slave to master(teensy ->rpi) gets shifted a position in the array. I cant figure...
  29. Tady

    DMA slave mode teensy 3.6

    Do you maybe have an example sketch for slave mode 8bit read/write? I'm trying to communicate with an raspberry pi and i got a library from one of the members of this forum but the comm is not reliable. Somtimes I experience like a shift in bits an I can't track down the problem :/
  30. Tady

    SPI-DMA-slave problem.

    How do I set for 8bit mode?
  31. Tady

    SPI-DMA-slave problem.

    I will take a look at the kinetis file. About the word ordering... I did some more digging i inserted a white space after every Serial print (don't know why i didn't do that in the start) and i got this: Data[0]=4D323E43. Everything is inside a single location. This is what I wanted. But still...
  32. Tady

    SPI-DMA-slave problem.

    Do you know where can I find info on all of these commands ? SPI_CTAR_FMSZ(15),DMA_TCD0_NBYTES_MLNO=2;,.... (and others) I'm really a beginner at these things :))))
  33. Tady

    SPI-DMA-slave problem.

    I was reading some forums and it seems they are both little endian... I will try you changes and see what happens.... The raspberry sends 64bytes/transfer and the data is 32bit. The rpi sends commands like 0x324D433E.. using your program i get on the terminal 4D323E43. The bit order is strangely...
  34. Tady

    SPI-DMA-slave problem.

    How do I setup for 16bit mode?
  35. Tady

    DMA slave mode teensy 3.6

    Did you manage to get the program working with 32bit write/reads?
  36. Tady

    SPI-DMA-slave problem.

    Is it possible to modify your program to recieve in 32bit. I tried using your program and i get the data without problems but the data is seperated into 4 positions inside the array. And the array locations are a little messed up :)
  37. Tady

    SPI-DMA-slave problem.

    Fixed it :) it seems there was a change in teensyduino core files.. instead of SPI0. i replaced them with KINETISK_SPI0. #define NDAT 8 int m_isMaster=0; short xx[NDAT],yy[NDAT]; void logg(short *yy, int nn) { int ii; if(m_isMaster) Serial.printf("Master: "); else...
  38. Tady

    SPI-DMA-slave problem.

    The code you posted doesn't compile :/ sketch_nov09a:37: error: 'SPI0' was not declared in this scope SPI0.MCR = //SPI_MCR_MDIS | // module disable ^ 'SPI0' was not declared in this scope
  39. Tady

    SPI-DMA-slave problem.

    Actually I'm not the author of the program :) the program is called Machinekit and someone has made a plugin that sends position and button commands via SPI to a PIC. All fitmware is available on GIT. But since buying a PIC and programming a precompiled code is no fun I wanted to give it a go...
  40. Tady

    SPI-DMA-slave problem.

    So bringing an old thread to life:) I was wondering if this example works with T3.5/3.6? I have a raspberry pi with a program that sends data to the SPI. So now I'm in need of a Teensy slave and I stumbled upon this interesting thread Thank you!
  41. Tady

    3D Printer Software with Teensy 3.1

    I love teensys also:)) but I buy them when needed:))))
  42. Tady

    3D Printer Software with Teensy 3.1

    Man this must have been expensive :) I managed to get Marlin working with T3.6 and built in SD card...
  43. Tady

    T 3.6 reading two analog inputs simultaneously

    Sorry.. I looked at the library. It even has a nice example on exactley what I need:) Thank you:)
  44. Tady

    T 3.6 reading two analog inputs simultaneously

    How fast is the read of the two ADCs. Did anyone measured the time it takes to complete the read?
  45. Tady

    T 3.6 reading two analog inputs simultaneously

    Woww thank you! It seems I missed that! Thank you so much:) I will try it out:)
  46. Tady

    T 3.6 reading two analog inputs simultaneously

    Hello! Is it possible to read two or more analog inputs at the same time? I was looking around the forum and googling and I can't find anything:/ Thank you
  47. Tady

    Extracting the joystick library

    Yes I know :) not a big problem:)
  48. Tady

    Extracting the joystick library

    Thank you for your reply:) I managed to go around this problem by entering new entries to boards.txt and usb_dev.h
  49. Tady

    set teensy 3.1 clock at 2 mega hertz!!!!!

    Wow! I'm from europe and I buy my teensys from Diigiit robotics. Every single board was working perfectly. And yes i saw all have an orange led :)
  50. Tady

    Extracting the joystick library

    Hello! I have a question on how to extract the Joystick library. I'm working on a code that has multiple combinations and I would like to display different names based on different #defines in my main code. I found the usb_desc.h that contains the defines that show up in windows game...
Back
Top