Search results

  1. C

    Simple computation requires presence of Serial.print statement in for loop

    Thanks MarkT will consider this. I think my problem has to do with accessing the same pointer in both the interrupt service and the main loop thus leading to a conflict.
  2. C

    Simple computation requires presence of Serial.print statement in for loop

    Looks like I have a bit of work to do. Thanks to all of you for your suggestions. When I get this thing working, I'll update everyone on what I've got.
  3. C

    Simple computation requires presence of Serial.print statement in for loop

    Paul, thanks for weighing in on this. I will try to restructure some code per your suggestions. Good point. I caught that possibility and have insured that p1 is reinitialized only in the interrupt service when bufferdone is set true. Have also modified interrupt service to take samples and...
  4. C

    Simple computation requires presence of Serial.print statement in for loop

    Joe, That is what I do in the interrupt service. I set bufferdone=true. Loop checks to see if bufferdone= true and processes the buffer.When loop completes it sets bufferdone=false. I think the difference between what you suggest and what I am doing is that setting bufferdone=true in the...
  5. C

    Simple computation requires presence of Serial.print statement in for loop

    Hi Pete, Tried one println before the for loop, doesnt "fix" problem. I suspect there is something else going on.
  6. C

    Simple computation requires presence of Serial.print statement in for loop

    Hi Joe, I thought if I dont turn off interrupts, the A/D interrupt service routine called by a Timer at 1.0 MHz will overwrite the existing buffer of samples while I'm processing them and change the pointer p1 in doing so. This would upset the for loop indexing to the sample array.
  7. C

    Simple computation requires presence of Serial.print statement in for loop

    Interesting idea. Despite your suggestion, the Serial.print in loop does work to print . The problem I have is that in the absence of that print statement in the for (j=0;j<1999;j++) loop, computation of the average value after completion of the iteration doesnt give a correct result...
  8. C

    Simple computation requires presence of Serial.print statement in for loop

    volatile unsigned int value1[2000]; // buffer for A/D values volatile unsigned int *p1 = value1; // pointer to A/D sample buffer1 I dont know how it is being allocated or how to find out. this is the allocation info from the compilation if this helps: Memory Usage on Teensy 4.1: FLASH...
  9. C

    Simple computation requires presence of Serial.print statement in for loop

    A delay doesnt change anything. I tried this. Not overflowing the UDP stack. The UDP data is correct and intact as received as evidenced by the Wireshark UDP stream received when the println statement is present in the for loop. There are a number of reasons I cannot post a lot of the code for...
  10. C

    Simple computation requires presence of Serial.print statement in for loop

    I'm using a T4.1 (600MHz clock) in a fairly complex program that regulates the current in a sensor using PWM to control the voltage in a resonant circuit(No problems here). I am interleaving two A/Ds to achieve 1MHz 12 bit sampling of an analog signal the average value of which R_AVG is used as...
  11. C

    Bug in Pedivide ADC library function

    Thanks, Joe. Problem solved. It was a dumb logical error on my part. In fact when I correct this, and assign both conversion results to e.g. value1, I can increase the sampling rate to 1MHz with no errors.
  12. C

    Bug in Pedivide ADC library function

    I'm using the adc .h library in an application requiring high speed 12 bit a/d conversion by interleaving the two A/Ds on a T4 or T4.1 running at 600MHz. The interrupt service is called every 2 microseconds by the timer in the Timer.lib. The bug is that the converted values from each conversion...
  13. C

    NativeEthernet compilation issue with Ethernet.begin(mac ,ip )

    Problem solved. I started thinking about why compiler would post this error if it was accessing the same libraries in both program cases. So it occurred to me that this might be a scope problem in my code, so the compiler interpreted the function call as a prototype without any type declaration...
  14. C

    NativeEthernet compilation issue with Ethernet.begin(mac ,ip )

    NO. I haven't tried it because I haven't had any problems with Native Ethernet in applications except this recent odd behavior of the compiler.
  15. C

    NativeEthernet compilation issue with Ethernet.begin(mac ,ip )

    I'm sending UDP messages successfully using the NativeEthernet library on a T4.1 to my windows 10 PC LAN as verified by Wireshark. The problem is that the Identical Ethernet.begin(mac,ip) statement compiles properly in one program but not in another, the latter throws a compiler error in the...
  16. C

    New PCBs: Multimeter reads a short if Potentiometers are maxed but are isolated

    If you are new to soldering the basic rule is " the solder will go to where the heat is ". So if you need to solder a pin on a device to a pad and plated thru hole, ensure that both the pin AND the pad are heated, then apply the solder.
  17. C

    New PCBs: Multimeter reads a short if Potentiometers are maxed but are isolated

    Fizzbopgalore: Are these pots wired as variable resistors to GND or are they wired as voltage dividers providing a variable voltage between Vcc at one end and GND at the other? If they are voltage dividers, then with both at full resistance to GND, the voltage tap is at minimum end resistance to...
  18. C

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    MichaelMC Just confirmed it works like a charm on Windows 10 with an T4 and a T4.1. I think there was an issue with Windows accepting my administrator run status. I had to go to the Properties display for the .exe file and in the Compatibility tab check a little box that said "Run this program...
  19. C

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    HI Tom Chiron. I'm obviously having trouble with Windows 10 and Power Shell or command line. I was able to run the teensy_ports.exe and get the usb address but Windows will not let me run teensy_serialmon.exe even with full admin rights. Asks me if I will allow the program to run but it wont...
  20. C

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    MichaelMC, I downloaded the executable file for x64 and the dll. Windows 10 will not let me install the dll even with administrator permission. When I try to register the dll using regsvr32 the error message says dll loaded but cant find entry point for DllRegisterServer. Also some compatibilty...
  21. C

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    thebigg :Have tried that but to no avail. cmd prompt doesnt recognize teensy_serialmon .
  22. C

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    Hi KurtE. Thanks for the TyCommander suggestion and link. I knew people were using it but I never checked it out myself. Will take a look.
  23. C

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    Thank you Michael! Very much appreciated! Will try it tonight with my T4.1. Will save me a lot of time. Also will help me learn how much effort it takes to write an app like this. Obviously not easy for a novice such as myself.
  24. C

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    I am sending USB RawHID from a T4.1. Works very nicely, but it would be useful to have a standalone utility app running on a PC ( e.g. Windows) that receives and displays the Serial Monitor data without the Teensyduino installed and running. If all a user of a project needs to see is serial...
  25. C

    usb to wifi link to computer using T4.1 and HID data

    Hi all, I have a scientific instrument I designed which has Ethernet capability and which currently uses the Serial Monitor with Raw HID for sending data via usb to a computer. I would like ideally to have a wireless connection in lieu of the USB cable or a LAN cable connection. First...
  26. C

    ADC averageing does not seem to be working

    The number of averages per conversion are in fact limited to 1,4,8,16, and 32 as stated by KurtE and Defragster. The averaging is done in hardware on each conversion returned. To increase the averaging you need to setup a summing variable that adds the averages from successive conversions and...
  27. C

    Teeensyduino locks up Windows10 computer after ruploading to T4.1

    The sketch save, verify, compilation and upload work properly but The Teensyduino totally locks up on my computer once in awhile to the extent that the mouse and keyboard stop functioning. the only way out of this state is to reboot the computer. I'm running Windows 10 and have only seen this...
  28. C

    Complete a circuit for controller buttons

    If you want to provide a relay function to connect two wires carrying AC or DC for a load, I recommend using a Teensy digital I/O line to control an opto-isolated solid state relay. As an example consider a part such as the LCA127 from Ixys available from Digikey in several packages. This is a...
  29. C

    Wiznet W5500. Teensy 4.0 pin connection

    That would be nice to have
  30. C

    Wiznet W5500. Teensy 4.0 pin connection

    This Ethernet3 library may be just the thing I need. I am currently using pin9 on a T4.0 for pwm and it cannot be changed as it is hardwired on a pcb. The function to allow changing the RST pin for the wiznet module should get me out of this conflict. Will try it out and let forum know.
  31. C

    Permissible functions in an ISR

    Hi All, The Question is: Are there documented restrictions on what operations can be performed inside an ISR? Specifically on T4.0 I thought that there were some timing functions that cannot function properly inside an ISR. For example, can delayNanoseconds() be called inside an ISR? It would...
  32. C

    Override of PWM pin output state

    Hi All, I am operating a Teensy 4.0, 600MHz clock, and a PWM frequency in the vicinity of 800kHz to 1MHz on pin 9. I have several questions about the state of a PWM output pin when operating at a PWM frequency established by an analogWriteFrequency command. What I want to accomplish is to...
Back
Top