So you are mister ccrause from
https://github.com/ccrause/fpc-avr
himself?
Alll examples were tested on hardware. Mostly on FPC trunk/main.
Can you please awnser again weither the source code from fpc-avr is finished far enoug to really run it on the AVR chip? / or not in final stage?
And allready, does anyone have example code for FPC-AVR for the UART, that compiles?
;D
Just remembered, everything except the blinktiny15 example were tested on hardware :-X. I don't have an attiny15 controller, but wanted to test the code generation capability of the compiler for a controller with no RAM.Can you please awnser again weither the source code from fpc-avr is finished far enoug to really run it on the AVR chip? / or not in final stage?Alll examples were tested on hardware. Mostly on FPC trunk/main.
Atmega328p & attiny85 and similar families should also compile with FPC 3.2.2
Mzz.. Only seems to compile for the Atmega328PThere isn't a uniform nomenclature for the different peripherals across different controller families. This means one has to confirm the register names, capabilities and bit settings for each controller type. When using a hardware abstraction layer library (e.g. Arduino), these details are hidden inside the libraries. FPC doesn't supply a HAL, only the controller specific definitions, so the user needs to take care of these differences.
Anybody got more UART code for the Atmega16A ?
Atmega328P | Atmega16A |
UDR0 | UDR |
UCSRA0 | UCSRA |
UCSRB0 | UCSRB |
UCSRC0 | UCSRC |
UBRR0L | UBRRL |
UBRR0H | UBRRH |
BTW does FPC-AVR suppport PWM signals or do i have to loop myself?FPC doesn't have a a HAL library, so one has to either use and configure a hardware timer for PWM mode, or write your own software bitbang PWM code loop.
Hey www.freepascal.org crew!
Can somebody advice me the right values of
i2c_master.start(0, false);
and if it has to be placed in the main program loop or just like above ?
Greets, Wouter van Wegen
PS: I am trying to I2C from my RPI3 on freepascal to my AVR on freepascal FPC-AVRTo do this one side needs to be the I2C master and the other side the slave. The I2C library you are referring to is for the AVR acting as the I2C master. If you want to use this, then the AVR needs to read data from the RPi, so the RPi needs to be running an I2C slave app. There are quite a number of discussions on this topic if you search for Raspberry Pi as I2C slave.