reprap:anet:anet_mainboard_overclocking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
reprap:anet:anet_mainboard_overclocking [2018/01/04 15:30] gmarsh23reprap:anet:anet_mainboard_overclocking [2018/01/04 15:41] – [Crystal selection and replacement] gmarsh23
Line 72: Line 72:
 If you're using the USB interface of the printer, using Octoprint for example, the crystal you choose affects how accurate the baud rate of the Mega1284P's UART will be at a given baud rate. For reliability reasons this should not exceed +-5%; ideally this value is less than +-2.5%. If you only printing from the SD card, this isn't an issue. If you're using the USB interface of the printer, using Octoprint for example, the crystal you choose affects how accurate the baud rate of the Mega1284P's UART will be at a given baud rate. For reliability reasons this should not exceed +-5%; ideally this value is less than +-2.5%. If you only printing from the SD card, this isn't an issue.
  
-MHz (below), baud (right) ^ 115200 ^ 230400 ^ 250000 ^ 460800 ^ 500000 ^ 921600 ^ 1000000 ^ 1500000 ^ +Crystal freq (below), baud (right) ^ 115200 ^ 230400 ^ 250000 ^ 460800 ^ 500000 ^ 921600 ^ 1000000 ^ 1500000 ^ 
-16 | 2.1% | -3.5% | 0% | 8.5% | 0% | 8.5% | 0% | 33% | +16MHz | 2.1% | -3.5% | 0% | //8.5%// | 0% | //8.5%// | 0% | //33%// 
-20 | -1.4% | -1.4% | 0% | 8.5% | 0% | -9.6% | -16.7% | -16.7% | +20MHz | -1.4% | -1.4% | 0% | //8.5%// | 0% | //-9.6%// //-16.7%// //-16.7%// 
-24 | 0.16% | 0.16% | 0% | -7.0% | **0%** | 8.5% | 0% | 0% | +24MHz | 0.16% | 0.16% | 0% | //-7.0%// | **0%** | //8.5%// | 0% | 0% | 
-25 | 0.5% | -3.1% | -3.8% | -3.1% | 4.2% | 13% | 4.2% | 4.2% | +25MHz | 0.5% | -3.1% | -3.8% | -3.1% | 4.2% | //13%// | 4.2% | 4.2% | 
-27 | 1% | -2.3% | -3.6% | 4.6% | -3.6% | 8.4% | 12.5% | 12.5% |+27MHz | 1% | -2.3% | -3.6% | 4.6% | -3.6% | //8.4%// //12.5%// //12.5%// |
  
 To calculate for different clock frequencies and baud rates, use the following math: To calculate for different clock frequencies and baud rates, use the following math:
  
-  * UART divisor = (Processor clock) / 8 / Desired baud rate +  * UART divisor = crystal frequency / 8 / Desired baud rate 
-  * Actual baud rate = (Processor clock) / 8 / rounded divisor value+  * Actual baud rate = crystal frequency / 8 / rounded divisor value
   * Actual baud rate and desired baud rate should be +-5%, preferably +-2.5%   * Actual baud rate and desired baud rate should be +-5%, preferably +-2.5%
  
Line 178: Line 178:
   #define DELAY_9_NOP DELAY_1_NOP; DELAY_8_NOP   #define DELAY_9_NOP DELAY_1_NOP; DELAY_8_NOP
  
-Lastly, find the following section:+Next find the following section:
  
   #if CYCLES_PER_MICROSECOND == 16   #if CYCLES_PER_MICROSECOND == 16
Line 186: Line 186:
   #endif   #endif
  
-Add the two middle lines shown, with the values altered to correspond to the crystal frequency you've chosen. Here is the setting for 24MHz - Note that "DELAY_20_NOP" and "DELAY_4_NOP" add up to 24.+Add the two additional lines shown (the #elif line and the line after), with the "24" value altered to correspond to the crystal frequency you've chosen. Here is the setting for 24MHz - Note that "DELAY_20_NOP" and "DELAY_4_NOP" add up to 24. If you're using a frequency that isn't a multiple of 1MHz, then round up (eg, use 25 for a 24.576MHz crystal)
  
   #if CYCLES_PER_MICROSECOND == 16   #if CYCLES_PER_MICROSECOND == 16
Line 222: Line 222:
   python createSpeedLookupTable.py --cpu-freq 25 > new_table.h   python createSpeedLookupTable.py --cpu-freq 25 > new_table.h
  
-If you're using a crystal frequency which isn't a multiple of 1MHz, you'll need to edit the script to remove the "* 1000000" line, and call the script with --cpu-freq <hz> instead.+If you're using a crystal frequency which isn't a multiple of 1MHz, you'll need to edit the script to remove the "* 1000000", and call the script with --cpu-freq <hz> instead.
  
 ==== Compiling and installing new firmware ==== ==== Compiling and installing new firmware ====
  
 There are many guides online describing how to compile and install Marlin on an Anet A8. Find one and link it here :) There are many guides online describing how to compile and install Marlin on an Anet A8. Find one and link it here :)
  • reprap/anet/anet_mainboard_overclocking.txt
  • Last modified: 2018/12/02 02:27
  • by 127.0.0.1