Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/11/06 08:55
Read: times


 
#122030 - oooh, then it's impossible, of course
Responding to: ???'s previous message
If you want to use an ARBITRARY pin, you need to do some software, which will take some time. Fullstop.

The fastest you can achieve is if you put cpl p0.5 into an endless loop, which is 3 instruction cycles (CCLK/2/(1+2) in LPC9xx). Of course, expect that it will do _nothing_ else but toggle the pin, then.

In case you want to run any "simultaneous" software, you need to resort to interrupts - that means a pseudo-call the CPL, a reti plus at least one instruction executed between interrupts (and no other interrupt running), that's CCLK/2/(2+1+2+2). Of course, the rest of your software will run DAMN' SLOW if you spend most of the time in the interrupt. And, expect a jitter on the output - the interrupts cannot interrupt an instruction in it's middle, so if you don't use any DIV or MUL and any other interrupt, the minimum jitter will be 1 instruction cycle (CCLK/2).

All in all, the best thing you can do is to reroute the hardware so that you can use the pin dedicated to timer toggle function (and, happy you, this is a LPC9xx extension, you won't find it on the "classic" '51 derivatives).

Jan Waclawek


List of 31 messages in thread
TopicAuthorDate
FAQ: P89LPC9221            01/01/70 00:00      
   Code Architect            01/01/70 00:00      
   that\'s impossible            01/01/70 00:00      
      pin toggle            01/01/70 00:00      
         Sure, but that does not achieve 3.xx MHz            01/01/70 00:00      
            interrupt            01/01/70 00:00      
               that will not do it as I did show in my post            01/01/70 00:00      
                  mode 2            01/01/70 00:00      
                     slovakian math ?            01/01/70 00:00      
                  usermanual of 89LPC9xx insufficient            01/01/70 00:00      
                     please read the WHOLE thread            01/01/70 00:00      
                        Can timer mode 2 overcome interrupt overhead?            01/01/70 00:00      
                           with mode 2 the reload is automatic as \"the            01/01/70 00:00      
                     did you not read            01/01/70 00:00      
   Re: 50kHz output...            01/01/70 00:00      
   I eneterd a FAQ on this            01/01/70 00:00      
      Where? I can't see it            01/01/70 00:00      
         here            01/01/70 00:00      
            I think you misplaced it...            01/01/70 00:00      
               I placed the FAQ correctly but - shame on me - pl            01/01/70 00:00      
                  What is the fastest frequency of Timer Mode 2            01/01/70 00:00      
                     fastest output            01/01/70 00:00      
                        Couldn't Wait in Endless Loop            01/01/70 00:00      
                           NOOOOOOOOO            01/01/70 00:00      
                              Where should i CPL p0.5 then?            01/01/70 00:00      
                                 oooh, then it's impossible, of course            01/01/70 00:00      
                                    89LPC9221 i2c interface            01/01/70 00:00      
                                       I am against "sharing code" but it is there            01/01/70 00:00      
                                          I2C interface with 89LPC9221            01/01/70 00:00      
                                             what does CodeArchitect do ?            01/01/70 00:00      
                                             push-pull?            01/01/70 00:00      

Back to Subject List