Search results

  1. P

    Interrupt use with incremental encoder not executed

    Thanks Joe, Appreciate your input. I'll try FreqMeasureMulti, though I need to change my hardware set up to use the correct pins. Not quite so easy on a proper Printed circuit board that I developed.
  2. P

    Interrupt use with incremental encoder not executed

    Thank you both. That is very helpful. The eventual project behind this is to produce code for a 3 axis control loading system used on a flight simulator. I have already generated one version which works quite well but the PID servo is not quite right and can be corrected by better velocity...
  3. P

    Interrupt use with incremental encoder not executed

    I have put together a small program designed to produce a velocity vector from a slowly rotating incremental encoder. In order to get the best resolution I have got interrupt routines on all edges, both rising and falling. The falling edge interrupts work fine, but the rising edge interrupts...
  4. P

    Blew up 2 Teensy LCs

    So just to round this session off. I bought 2 off Teensy 4s from the PiHut. And have designed a PCB to pick up the pins underneath for the second SPI port. Hopefully that should sort everything out. Though I am still interested in trying to reprogram the boot code in the Teensy LCs. BR Pete D
  5. P

    Blew up 2 Teensy LCs

    HI Paul, Thanks very much for your input and offer. I suspect the problem with the Teensy LCs is entirely my own fault. Being in the UK I think delivery costs from the States is not very efficient and I can easily buy genuine Teensy4s direct from UK suppliers. I think from a technical point of...
  6. P

    Blew up 2 Teensy LCs

    Ah yes, i wondered why his picture had changed :) ........
  7. P

    Blew up 2 Teensy LCs

    Hardware set up: each Max 7219 chip drives 5off 7 segment displays using efficient LEDs so current per display is very low and I have also turned down the brilliance to a low level. So when it worked via a single SPI buss there are 35off 7 segment displays. drawing approx. 50mA. I added a...
  8. P

    Blew up 2 Teensy LCs

    Hi Paul, Thanks for the info, tried that to no avail. So really I was after the process used to load software/firmware into the Teensy when manufactured, maybe using a Freescale programmer?? or is the firmware already loaded when you buy the memory chips?? BR Pete Dobson.
  9. P

    Blew up 2 Teensy LCs

    H, Thanks for your reply. I am monitoring the current using a USB current monitor board. Total current drawn is about 40mA so well within the capability of the USB port. I retested the voltages on all the Teensy LC pins and none are above 3.3v. I now think what happened is that I stupidly tried...
  10. P

    Blew up 2 Teensy LCs

    Hi, I have been writing code to run MAX7219s driving 7 segment displays connected to X-Plane via the "Flight Sim Controls" interface. This all worked and I got 7 MAX chips to run from a Teeny LC. Then I wanted to add a further 2 off MAX chips, so I started a second SPI port as a single port can...
  11. P

    Teensy 4.0 i2c Port1

    I just wish I had started software earlier in my career, always seemed to me to be a black art. I ran an electronics company for ten years and now retired stared dabbling in my other hobby, flying. As a result I now use Teensys for high calibre hobby flight simulators driving simulated flight...
  12. P

    Teensy 4.0 i2c Port1

    Hi BriComp, Works a treat, thank you so much for your help. I think I understand why it works but now I have got this going I can finish what I was doing and then spend more time understanding how the code is working. Appreciate the library "WireData.h" is exchanges for direct code instead. I...
  13. P

    Teensy 4.0 i2c Port1

    The following code runs correctly if I use i2c port 0 changing (wire1 to wire). But this would occupy two useful PWM channels, so I want to use i2c port1. If I modify the code to "wire1" this redirects the port pins that are used correctly. I can see the data on an oscilloscope. But the...
  14. P

    ILI9341 seven segment font

    Hi Kris, That was amazingly useful. The only reason I was using Adafruit library is because I did not know any better. Now switched to _t3 and created my own font. Progress. Thank you so much for your help. Also Thanks to Kurt. Charging ahead now :-) BR Pete Dobson.
  15. P

    ILI9341 seven segment font

    Thanks Kurt, Now need to spend a bit of time absorbing your detailed information. Thanks again. BR Pete D.
  16. P

    ILI9341 seven segment font

    Sorry, very much a newby, I want to write 7 segment font ( 0 to 9 only) to the QVGA 2.2" display 240x320. I have no idea how to a) find a suitable font, b) how to call it for use in the code. I have been playing with the code below (completely unfinished) but if I can change the default font...
  17. P

    Teensy LC timers

    Teensy LC timer read by DMA? Thank you Paul. Moved on a bit (with your help) and have uncovered another problem. If the phasing of the two signals are pretty much in sync then the channel interrupt (ISR Ch X) occurs whilst the reference interrupt (ISR Ref) is still running (Measured to be 2 to...
  18. P

    Teensy LC timers

    Teensy LC timers. Since last posting I have moved on a bit. Got all 6 channels to work and print out, but do not have the knowledge to format the data into a form that can be sent via i2c. can any one help? I don't understand "union" for example or how to use it in this application. I need to...
  19. P

    Teensy LC timers

    Well that fixed it. Thanks Manitou, your work on dual Teensys got me thinking down different routes and overnight it became obvious. I am getting multiple falling edges on the interrupt lines. Checked it out this morning and sure enough there they were approx 1uS apart. That'll teach me to...
  20. P

    Teensy LC timers

    Teensy LC misbehaving. Thanks very much for the code worked a treat and it has moved me forward a long way. I am pretty happy with the hardware. A single 0v every where, the input comparators are supplied from the Teensy 3.3v so should not be any issues there. The sine wave inputs are all...
  21. P

    Teensy LC timers

    Teensy LC timers. Hi Theremingenieur, I am still having trouble with I2C so have put that to one side for the moment and instead I am outputting the Resolver angle as an analogWrite. Then in the other teensy 3.5 card I am analogReading the value to get the effect I need. This works as long as...
  22. P

    Teensy LC timers

    Thank you Paul, I will have a look at the FreqMeasureMulti. Will also check out unsigned Integers to cope with overflow. I ran your code Theremingenieur, and as expected it works with the hardware just fine. The test Print output is perfect. The serial data output is present and the number of...
  23. P

    Teensy LC timers

    Thank you all for your help. I apologizes the most important piece of information I forgot to add is that this is driving aircraft system instruments (made by Frasca) so all the signals to and from the resolver are 400Hz. So a timer that last just a little longer that 2.5mS before overflow would...
  24. P

    Teensy LC timers

    Thanks for your very quick reply. The reason for no attachment is that I could not see how to attach a file. But now I return to the forum the WEB layout is different so have attached the file in question. Basically I am trying to read the timing of interrupts when they arrive to allow me to...
  25. P

    Teensy LC timers

    I have a working script for Teensy ++2 but when I change to the Teensy LC the timer register values are not recognized: TCCR3A = 0; TCCR3B = 0; I also want to read the timer which for Teensy ++2 works: timerRef = TCNT3; What text format should I use to access the Teensy LC timer (don't...
  26. P

    Teensy 3.5 FlightSim Float problem

    Can DataRefs be abbreviated in any way??
  27. P

    Teensy 3.5 FlightSim Float problem

    Thanks for the quick response Paul, So How do I get round this problem?? I am not aware of a shorter data ref for Radio Height??
  28. P

    Teensy 3.5 FlightSim Float problem

    Teensy 3.5 and FlightSimFloat Hi Paul, Rich33, Thanks both very much for your help. Now all 7 instruments are running from a single Teensy3.5 using floats. I will post some photos of the final hardware build. To put the icing on the cake I decided to add a digital output for Decision Height...
  29. P

    How to stop continuous FlightSim updates. Tennsy++2

    Hi Paul, It seems that allowing "FlightSim.Update()" just once is enough to start communications with X-Plane continuously. So on one program cycle I allowed "FlightSim.Update()" and then on subsequent cycles I did not allow "FlightSim.Update()" but still communications continue. So My idea does...
  30. P

    How to stop continuous FlightSim updates. Tennsy++2

    Hi Paul, thanks very much for your input. I looked at both Bounce and Bounce2 but decided it was better for me to look for trailing edge detection (does not appear in my test code) using the following sort of code for each button (of which there are many), then the Delay() does become the...
  31. P

    How to stop continuous FlightSim updates. Tennsy++2

    Need a bit of help, I have written code which communicates with X-Plane11 via USB Flight Sim Controls. The problem I have is that the current code gets updates on X-Plane "heading" every program cycle. I actually only need "heading" when I update "CourseBug" to be equal to "heading". This is...
  32. P

    Teensy 3.5 and X-Plane

    Thanks for your help Paul. Still struggling with flightSimFloat (don't work) and flightSimInteger (which do work) on Teensy 3.5. maybe you are not supporting this any more?? Have A GREAT Christmas. BR Pete D.
  33. P

    Teensy 3.5 and X-Plane

    Hi Ben, Thanks for getting back to me. I followed your thread all the way through to Paul's modification to Corrected typecast in "usb_flightsim.cpp" at line 222 where he amends it from Long to Float. I made the change but it did not solve the problem. So like you, I'm still searching...
  34. P

    Teensy 3.5 and X-Plane

    An Update. As per other Threads, if I declare the Flight Sim variable as "FlightSimInteger", the whole thing works. but doesn't on Teensy 3.5 if I use "FlightSimFloat". So quite pleased it now works but increments of 1 Kt on the ASI are a bit steppy. So it would be nice to learn how to make it...
  35. P

    Teensy 3.5 and X-Plane

    Hi, I am trying to get data from X-plane to Teensy 3.5. I started with a fairly complex project which I just could not get to work so I have slowly stripped it back to virtually nothing. This code runs and works on a teensy 2++. whilst I can see it running on the Teensy 3.5 it is not forwarding...
  36. P

    Teensy used with X-Plane and Air Manager

    The Teensy works very well with X-Plane Data Refs. using the PJRC X-Plane Plug-in. I am also using Sim Innovations "Air Manager" to generate instruments for the simulator, also works well, But some of the instrument parameters; switch selection inputs, etc. are not mapped to X-Plane Data Refs...
  37. P

    TEENSY LC PWM outputs don't all work

    OK, I am being dumb. I tried writing directly analogWrite(22, 128); for example and that worked. So I then tried writing to the 10 PWMs all fixed values. This did not work. I began to think that the Teensy LC could not deal with 10 off PWMs all at once. So I rewrote the project (Same coding as...
  38. P

    TEENSY LC PWM outputs don't all work

    Thanks for your reply. I have been using "TeensyControl" plug-in within X-Plane 10 to verify that the simulator is outputting valid and non zero data. I can confirm that all 10 channels from the simulator are giving valid data. I have verified all PWM outputs on a 'Scope and only the 5 on the...
  39. P

    TEENSY LC PWM outputs don't all work

    P.S. I mistakenly put the LED on pin 2, it should of course be on pin 13 for the Teensy LC.
  40. P

    TEENSY LC PWM outputs don't all work

    I have written some code to extract the engine instrument data from X-Plane 10. The program all works on PWM pins 3,4,6,9,and 10 but I get nothing out on pins 16,17,20,22 and 23. I am checking the pin outputs with an oscilloscope. I tried pull up resistors, made no difference. The output pins...
Back
Top