View previous topic :: View next topic |
Author |
Message |
RionKusakabe
Joined: 11 Sep 2012 Posts: 3
|
Posted: Mon Aug 27, 2018 8:42 pm Post subject: Fastest IC |
|
|
Good day
My question is very simple
Which IC is the fastest I can program with Bascom. Unfortunately I can not find a list for it
I hope you can help me here
(BASCOM-AVR version : 2.0.8.1 ) |
|
Back to top |
|
|
Porelo
Joined: 23 May 2005 Posts: 39 Location: Portugal
|
Posted: Mon Aug 27, 2018 8:50 pm Post subject: |
|
|
The seri xmega, but depends on the application, should be an always pondered choice.
On the Up manufacturer's page you will find this information.
Miguel |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Tue Aug 28, 2018 10:24 am Post subject: |
|
|
follow options/chip in the IDE
The speed is function of acceptable frequency ( mainly 20Mhz for mega series) more for xmega
but the first reason you choice a speed is your program !
So
what do you want to do ?
JP
_________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
RionKusakabe
Joined: 11 Sep 2012 Posts: 3
|
Posted: Tue Aug 28, 2018 9:53 pm Post subject: |
|
|
Thanks for the quick responses . I have to evaluate an encoder with 2500 pulses per revolution |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Wed Aug 29, 2018 7:14 am Post subject: |
|
|
Hi,
Maybe have a look at using an ICP (Interrupt Counter). This is nothing more than when a pin changes (Low->High or High->Low) a counter in incremented, and this all happens in hardware (your software only needs to read the counter every so often).
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Wed Aug 29, 2018 8:25 am Post subject: |
|
|
Have a look at the pulsein function I use it to decode infrared remote control using an interrupt
Regards Paul |
|
Back to top |
|
|
hgrueneis
Joined: 04 Apr 2009 Posts: 902 Location: A-4786 Brunnenthal
|
Posted: Wed Aug 29, 2018 1:08 pm Post subject: |
|
|
One important factor is VCC max.
Atmega up to 5.5V, ATXMEGA up to 3.6V.
Lower VCC works with lower frequency (see data sheet).
If the interfaced device is at a differing voltage, then you need voltage level converters.
Regards
Hubert |
|
Back to top |
|
|
hgrueneis
Joined: 04 Apr 2009 Posts: 902 Location: A-4786 Brunnenthal
|
Posted: Wed Aug 29, 2018 1:09 pm Post subject: |
|
|
One important factor is VCC max.
Atmega up to 5.5V, ATXMEGA up to 3.6V.
Lower VCC works with lower frequency (see data sheet).
If the interfaced device is at a differing voltage, then you need voltage level converters.
Regards
Hubert |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Wed Aug 29, 2018 6:03 pm Post subject: |
|
|
maybe I'm a liitle bit too old but I remember to have used the HCF4520B a IC which count the pulse , you can cascade them to have a bigger counter
It counted around 5/6mhz pulses not so bad !
like that your µP is only a reader of the IC
JP _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
RionKusakabe
Joined: 11 Sep 2012 Posts: 3
|
Posted: Thu Aug 30, 2018 8:06 pm Post subject: |
|
|
I used the interrupt function.
In the interupt I read then by an if query from which direction the encoder turns that works very well.
I'd like a bigger buffer by a faster IC.
If I want to use the XMega series with 32MHz I need an external crystal or is the internal oscillator enough. |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Fri Aug 31, 2018 12:52 am Post subject: |
|
|
The mega1284 has 16K of ram and 20mhz speed with external crystal
a large buffer is not a problem
Try not to do too much in an interrupt
below is how I decode the IR pulses
Code: |
'this gets called when we receive IR pulses on interrupt two pin
Int_2isr:
' Print "yes"
' Lcdat 1 , 1 , "IR>>>>"
Pulsein Length , Pinb , 2 , 1 'here we measure the length of the pulse
'Note many start with a 450 pulse which
'you can use to indicate start BUT NOT ALL DO!
Select Case Length
Case 0 'end of data,
'Lcdat 1 , 1 , "BX=3"
' Wait 1
Bx = 3
Case Is < 80 'adjust for timing as seen in
'PROTOCOL_TEST_TIMING
Datagot.px = 0
Case Is < 190
Datagot.px = 1
'Most of the time this is only there to get the receiver to start up
'and is not needed for decode of data
Case Is < 500 'start of transmission
Case Is > 3500 'end block some remotes transmit
'more than one block of data
'but we will not need this second
'block most of the time
'Incr Flag
Px = 0
End Select
Incr Px
Return
|
|
|
Back to top |
|
|
ATIU
Joined: 15 Oct 2004 Posts: 534
|
Posted: Fri Aug 31, 2018 1:16 am Post subject: |
|
|
It all depends on what you are trying to achieve. If you only need to count the pulses, then instead of interrupts, use the hardware counters. You can add a front end logic to determine if this is forward or reverse pulse. You can also use the XMega that has a built in quadrature decoder that can generate event to the counters. |
|
Back to top |
|
|
jure_m
Joined: 14 Jan 2005 Posts: 68 Location: Ljubljana
|
Posted: Thu Sep 06, 2018 8:28 am Post subject: |
|
|
If you need really fast AVR then use FPGA and program it as an AVR, search the web or see one link here.
Best regards
Jure |
|
Back to top |
|
|
JC
Joined: 15 Dec 2007 Posts: 585 Location: Cleveland, OH
|
Posted: Thu Sep 06, 2018 11:59 pm Post subject: |
|
|
Quote: | If I want to use the XMega series with 32MHz I need an external crystal or is the internal oscillator enough. |
The Xmega chips have multiple clock sources, and a PLL to multiple the clock frequency.
One can easily run an Xmega on its internal 32 MHz clock.
The Xmega A series are the big Xmegas, with lots of pins, and lots of modules.
The Xmega E series is the smallest of the Xmegas, (pin wise), and additionally has a programmable logic unit that might be useful in your project.
Finally, know that the Xmega core seems to run well at 3 V and room temperature at 48 MHz, (via the PLL), for the core digital functions.
One would not want to run at that speed if one was using the ADC, DAC, AC, or EEPROM.
It would also probably not be a good idea to run out of spec for a commercial product.
JC |
|
Back to top |
|
|
|