Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

alexan_e's Blog

alexan_e
1 min read
Views
1K
Uncategorized
- Create a new project in Uvision and then open the project properties write fromelf --bin -o @L.bin !L in the "run user program after build" command. This command generates the bin file from the elf file Create a MBED_Flash.bat with the following content and place it in the project...
alexan_e
Updated
4 min read
Views
1K
Comments
1
AVR
This is a custom function to convert a number to the ASCII representation /***************************************************************************** ** Function name: ULongToStr ** ** Descriptions: converts an unsigned long to ASCII characters and stores the result to a char array...
alexan_e
1 min read
Views
808
AVR
Fast value reverting function for 8-bit char and 16-bit integer, it uses a lookup table for each nibble (4-bits). /***************************************************************************** ** Function name: reverse_byte ** ** Descriptions: reverts the bits of a byte b0->b7, b1->b6...
alexan_e
1 min read
Views
1K
AVR
The atmega has a few different PWM modes, the frequency and duty ratio depend on the mode and values used, this is a description of the way to calculate them. In fast PWM top=ICR1, the output PWM frequency=timer clock/(ICR1+1) and the duty=OCR1A(B)/ICR1 In fast PWM top=0h00ff, the output...
alexan_e
3 min read
Views
1K
AVR
The following macro can be used to simplify the process of using the internal AVR EEPROM #include <avr/eeprom.h> // defines for eeprom access #define read_eeprom_byte(address) eeprom_read_byte ((const uint8_t*)address) #define write_eeprom_byte(address,value) eeprom_write_byte...
alexan_e
2 min read
Views
1K
Uncategorized
In some compilers like codevisonAVR you can access individual bits using PINA.0 or PORTA.2, to do a similar thing with avrgcc you can use // structure to allow bit field operations, name conversions: PORTA.0 -> PORT_A.b0 PORTB.7 -> PORT_B.b7 typedef struct{ uint8_t b0:1; uint8_t b1:1...

Part and Inventory Search

Blog information

Author
alexan_e
Blog entries
6
Last update

Share this blog

Back
Top