Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: tlb

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    87
    Views
    77,522

    wushumike: I'm not exactly sure what you are...

    wushumike:

    I'm not exactly sure what you are asking.

    If you want to stop the hardware counting, my question is what is the encoder doing during this time. If the encoder is not moving, then...
  2. Do you need the loop functionality? Otherwise,...

    Do you need the loop functionality? Otherwise, just do all the programming with setup(). Read the dip switches and decide which of several programs to execute during the setup() routine. You never...
  3. Thread: MCGIRCLK Clock

    by tlb
    Replies
    4
    Views
    1,625

    There are two clocks, MCGIRCLK, which is off the...

    There are two clocks, MCGIRCLK, which is off the 4 Mhz internal reference and OSCERCLK which is directly off the 16 Mhz crystal. OSCERCLK is easier to setup (after the default initialization), which...
  4. Replies
    87
    Views
    77,522

    Its always 4x, the only option. You are probably...

    Its always 4x, the only option. You are probably interpreting your spec's wrong. PPR is pulses per revolution, versus LPR, lines per revolution. The PPR number already assumes the 4x reading. ...
  5. Replies
    87
    Views
    77,522

    I don't know where you read this, but I have two...

    I don't know where you read this, but I have two Teensy's running my QuadDecode code - two encoder channels on one Teensy and the third on a 2nd Teensy. I communicate between the two with I2C. The...
  6. Replies
    87
    Views
    77,522

    Are your grounds hooked up correctly? You get...

    Are your grounds hooked up correctly? You get this kind of a pattern when one encoder line is not toggling. One line goes high, counts 1, same line goes low again, counts down again. The line may...
  7. Thread: MCGIRCLK Clock

    by tlb
    Replies
    4
    Views
    1,625

    MCGIRCLK Clock

    So I don't have to wade thru all the details:

    For the default Teensy3.1 setup (48 Mhz) is MCGIRCLK the same frequency as the system clock? Or what frequency is it at?

    I want to use LPTMR Low...
  8. Chapter 10: Signal Multiplexing and Signal...

    Chapter 10: Signal Multiplexing and Signal Descriptions

    10.3.1 is table for Signal Multiplexing

    And then set up Pin Control Register (PORTx_PCRn) (Chapter 11.14.1) bits 10-8 for Pin Mux...
  9. Replies
    7
    Views
    1,868

    So much for backward compatibility! I realized...

    So much for backward compatibility! I realized after I posted, I was looking at the the Teensy3.1 manual. Doesn't make me think very nice thoughts about the designers of this part, switching the...
  10. Replies
    7
    Views
    1,868

    Just a quick look at your code and I am not...

    Just a quick look at your code and I am not exactly sure what is happening but some thoughts.

    From the Reference Manual pg 780:



    So first of all you should be writing a 0, and then you...
  11. You could have the PC start a program (Python)...

    You could have the PC start a program (Python) when Windows starts(Scheduled Tasks). And then this program runs in the background and talks to the Teensy.

    I use Python on Windows. Pyserial to...
  12. Replies
    4
    Views
    1,118

    I'm using Windows so hopefully this also applies...

    I'm using Windows so hopefully this also applies to Mac. I have two Teensy's hooked up to two separate USB ports. To update a given Teensy, I point the bootloader (teensy.exe) to the appropriate...
  13. Replies
    2
    Views
    823

    64 bit Windows 7 Support

    Is there any issue with Windows 7 - 64 bit support for any of the Teensy toolset?

    I'm looking at getting a new laptop and running Teensy is one of the must have applications.

    Thanks,

    TLB
  14. Replies
    87
    Views
    77,522

    This is due to the use of templates in the code. ...

    This is due to the use of templates in the code. Templates are used to allow the same logical code for both decoder channels (separate hardware). The compiler must see QuadDecode_def.h only once...
  15. Replies
    87
    Views
    77,522

    I am doing something fairly similar - reading an...

    I am doing something fairly similar - reading an encoder and exporting the count over a serial channel. So your application should fit right in. The calcPosn() method sends back the position as a 32...
  16. Replies
    87
    Views
    77,522

    Teensy3.1 has hardware quadrature counting...

    Teensy3.1 has hardware quadrature counting support, however it is only a 16 bit counter, giving 64K counts. The issue, and the reason for the interrupts is if the system requires more than 64k...
  17. Replies
    8
    Views
    3,478

    Simple answer to programming multiple Teensy's -...

    Simple answer to programming multiple Teensy's - just plug the Teensy's into different USB ports, and press the download button on the appropriate Teensy. So I just drag the .hex files to the Teensy...
  18. Replies
    3
    Views
    1,204

    Thanks. I had noticed this post before but...

    Thanks. I had noticed this post before but couldn't find it again.
  19. Replies
    3
    Views
    1,204

    Accessing Comparator Hangs Serial on Teensy 3.1

    I am trying to use the comparator on Teensy3.1. I am talking to Teensy over USBSerial. If I do any accesses to the comparator, Serial will not initiate, even if the comparator code is after the...
  20. Replies
    549
    Views
    225,380

    Got Robin's email and started looking up about...

    Got Robin's email and started looking up about this part. Have been busy figuring out the one path for resource allocation to add position latching with my Teensy 3.1's and not doing much Forum...
  21. Replies
    0
    Views
    763

    Comparator used in Teensy3.1 startup code?

    Just want to verify - is the Comparator (CMP) used for anything in the default Teensy3.1 startup code. I searched thru the code and couldn't find anything, so it looks like I will be okay. I found...
  22. Replies
    87
    Views
    77,522

    The quadrature decode hardware on the processor...

    The quadrature decode hardware on the processor only has the capability for what would be 4x count mode, and that is what is supported. No other options.

    TLB
  23. Replies
    87
    Views
    77,522

    Not exactly sure what you are asking. The code...

    Not exactly sure what you are asking. The code assumes a quadrature input signal and determines position and direction from that.

    TLB
  24. Replies
    87
    Views
    77,522

    Yes, those are the Teensy pin numbers. The...

    Yes, those are the Teensy pin numbers. The others are the ARM pin numbers.

    TLB
  25. Replies
    87
    Views
    77,522

    My system does not have an index channel, so I...

    My system does not have an index channel, so I did not write code for it.

    As far as the hardware goes, there is not much it supports completely. There are enough pieces to do just about anything...
  26. Replies
    8
    Views
    3,478

    Could you tell me what you are doing? How is...

    Could you tell me what you are doing? How is your system set up and how did you set up the download port for the individual projects. I am still in the 'stumble thru' mode using this system.
    ...
  27. Replies
    8
    Views
    3,478

    I loaded the Atmel Studio/Visual Micro IDE and...

    I loaded the Atmel Studio/Visual Micro IDE and have two Teensy 3.1's hooked up. I am having trouble getting automatic compile and download to switch between the two Teensy's. I select between the...
  28. Replies
    87
    Views
    77,522

    Hi Brian, Teensy 3.1 can decode two encoders. ...

    Hi Brian,

    Teensy 3.1 can decode two encoders. And from your other post you have an encoder edge rate of 53 kHz. This would give an interrupt rate of about 10 Hz to update position with the...
  29. Replies
    8
    Views
    3,478

    Can I run Teensy 3.x with Atmel Studio without...

    Can I run Teensy 3.x with Atmel Studio without the VisualMicro plugin? I'm using some Teensyduino routines, but I don't have a standard Arduino setup, I use the makefile. I was satisfied with my...
  30. Replies
    2
    Views
    1,477

    Hi Michael, Thanks for the pointer (hate to...

    Hi Michael,

    Thanks for the pointer (hate to use that term, but couldn't think of a better one).

    This is a post that it took a while to figure out the answer and reply.

    I decided I did need...
  31. Replies
    87
    Views
    77,522

    Hardware Quadrature Code for Teensy 3.x

    Attached is my code for utilizing the hardware quadrature decode for Teensy3.x. As others have noted, it is not straightforward. The marketing department must have decided the applications that...
  32. Replies
    8
    Views
    3,478

    Programming Multiple Teensy's

    How do I program multiple Teensy 3.1's, different code in the two Teensy's? I have seen it referred to, but can't find any instructions. (And forum search doesn't work very well with multiple...
  33. Replies
    2
    Views
    1,477

    Register Addressing

    For Teensy 3, in mk20dx128.h, there is:


    #define FTM1_CNT *(volatile uint32_t *)0x40039004 // Counter
    and

    #define FTM2_CNT *(volatile uint32_t *)0x400B8004 // Counter

    so one can write...
  34. Replies
    11
    Views
    10,156

    The Vector handler and IRQ numbers are fixed in...

    The Vector handler and IRQ numbers are fixed in hardware. (Table 3-4 in the reference manual). mk20dx128.h defines the variable names for these.


    NVIC_ENABLE_IRQ(IRQ_PORTA);
    would enable the...
  35. Just looking around quickly, looks like they are...

    Just looking around quickly, looks like they are defined in wiring.h as __enable_irq() and __disable_irq().

    __enable_irq() and __disable_irq() are defined in mk20dx128.h

    Make sure these files...
  36. Replies
    11
    Views
    10,156

    BTW, as far as includes, the only include I have...

    BTW, as far as includes, the only include I have is

    #include "WProgram.h"
    from the sample main.cpp in ...\arduino-1.0.5\hardware\teensy\cores\teensy3

    I believe that ends up including pretty...
  37. Replies
    11
    Views
    10,156

    I don't know how much information you have, but...

    I don't know how much information you have, but pieces to refer to:

    From http://www.pjrc.com/teensy/datasheets.html

    Download the MK20DX256 Manual. From this you will see there are many ways to...
  38. Replies
    3
    Views
    2,298

    Here is the Makefile I am using. It is a...

    Here is the Makefile I am using. It is a derivative of the sample in ...\arduino-1.0.5\hardware\teensy\cores\teensy3. You have to copy the .c and .h files from that same directory to the directory...
  39. Replies
    1
    Views
    1,362

    FTM1 Reassignment for Teensy 3.1

    I want to use the FTM1 timer module on my Teensy 3.1.

    It looks like it is being initialized by the function _init_Teensyduino_internal_(void) in pins_teensy.c

    It appears this initialization is...
  40. Replies
    6
    Views
    3,640

    Is there an updated version of the sample...

    Is there an updated version of the sample Makefile past the one that has


    # options needed by many Arduino libraries to configure for Teensy 3.0
    OPTIONS += -D__MK20DX128__ -DARDUIO=104

    If so,...
  41. Replies
    6
    Views
    3,640

    BTW, the previous is on a Windows XP system. ...

    BTW, the previous is on a Windows XP system.

    TLB
  42. Replies
    6
    Views
    3,640

    Is there supposed to be a teensy31 directory...

    Is there supposed to be a teensy31 directory somewhere? Or am I looking in a completely wrong place.

    I am looking at the default Makefile included under...
  43. Replies
    6
    Views
    3,640

    Quick question: The default Makefile included...

    Quick question:

    The default Makefile included under arduino-1.0.5\hardware\teensy\cores\teensy3 includes the line:


    # options needed by many Arduino libraries to configure for Teensy 3.0...
  44. Thread: Serial Latency T2

    by tlb
    Replies
    3
    Views
    1,664

    Thanks for your reply, and sorry for the delay in...

    Thanks for your reply, and sorry for the delay in responding. Previously I received an email when there was a reply to my posts, but this time I didn't get any email so I didn't realize there was a...
  45. Replies
    6
    Views
    3,640

    More Teensy3.1 Makefile Questions

    I am switching over to a Teensy3.1 from a Teensy 2.0.

    I want to use C code to be able to access some features (Quadrature Decoding on the Flex Timer Module).

    So the first step is getting the...
  46. Replies
    8
    Views
    2,638

    The read has up to a 1.5 clock cycle delay to...

    The read has up to a 1.5 clock cycle delay to synchronize the inputs. Since there can be one instruction per clock, it could get in ahead.

    Also, this could be a compiler 'feature'. Without the...
  47. Thread: Serial Latency T2

    by tlb
    Replies
    3
    Views
    1,664

    Serial Latency T2

    I have something that is working but I don't fully understand. This is with Teensy2, running a serial channel to a WindowsXP laptop.

    My concern is not missing 200 uSec period timer interrupts...
  48. Replies
    2
    Views
    7,071

    C Syntax to Change Multiple Bits

    Is there any C syntax to change multiple bits on a port while leaving the others the same?

    I would like to do something like

    PORTD.[7:6] = 0b01;

    i.e.

    PORTD.7=0;
    PORTD.6=1;
  49. Replies
    1
    Views
    2,425

    Since there was no answer, I set up an experiment...

    Since there was no answer, I set up an experiment to measure the latency. I did set up a timer interrupt to interrupt on compare. The first operation in the interrupt routine was to read the timer....
  50. Replies
    1
    Views
    2,425

    USB Serial and Interrupt Latency

    I am running USB serial to a Windows PC from a Teensy 2.0 running at 16 MHz, using the C libraries. I am doing both send and receive at a fairly low data rate, less than 100 bytes/sec.

    How will...
Results 1 to 50 of 56
Page 1 of 2 1 2