Hi,
How do I blink an LED on pin_11 PB_5 on attiny417 chip?
More exactly how do I blink it when I receive some command via UART?
There are absolutely no examples for this chip.
I can't figure out even how to set up the pins.
nothing - nada -
Anybody?
Thanks
ATTiny417 LED blinking
-
- Posts: 282
- Joined: 17 Jun 2009 10:42
Re: ATTiny417 LED blinking
mikroe team,
are there any examples for this type of microprocessor, so I can get a starting point?
any kind of code, it won't matter.
Thanks.
are there any examples for this type of microprocessor, so I can get a starting point?
any kind of code, it won't matter.
Thanks.
Re: ATTiny417 LED blinking
Hi,
I'm not sure if we have used this MCU before, you can check the chapter 16. PORT - I/O Pin Configuration from the datasheet :
http://ww1.microchip.com/downloads/en/D ... 01901B.pdf
Regards,
Filip.
I'm not sure if we have used this MCU before, you can check the chapter 16. PORT - I/O Pin Configuration from the datasheet :
http://ww1.microchip.com/downloads/en/D ... 01901B.pdf
Regards,
Filip.
-
- Posts: 282
- Joined: 17 Jun 2009 10:42
Re: ATTiny417 LED blinking
thanks filip, but I've already looked at the datasheet
And the datasheet says:
The datasheet also says:
*******
So, how do I start coding this micro, if the basic blocks are not recognized by the compiler?
I am tempted to believe that this type of microprocessor is NOT supported by the AVR compiler at all.
Regards
And the datasheet says:
But any attempt to write a code including anyThe I/O pins of the device are controlled by instances of the PORT peripheral registers.
This device has the following instances of the I/O Pin Configuration (PORT): PORTA, PORTB, and PORTC.
orPORTA
orPORTB
comes with an error as unrecognisedPORTC
PORTn
The datasheet also says:
But any attempt to write a code including anyEach of the port pins has a corresponding bit in the Data Direction (PORT.DIR) and Data Output Value
(PORT.OUT) registers to enable that pin as an output and to define the output state.
orPORT.DIR
comes with the same kind of errorPORT.OUT
*******
So, how do I start coding this micro, if the basic blocks are not recognized by the compiler?
I am tempted to believe that this type of microprocessor is NOT supported by the AVR compiler at all.
Regards
Re: ATTiny417 LED blinking
There is certainly no mikroE hardware support for this obscure chip.
There is no mikroE dev board or mikroE programmer support.
Here is my pathetic attempt at LED blink on all pins, for what it is worth (nothing).
Seems to work on simulator, but no idea if it would work on real hardware.
I see that UART library functions can be selected, but I have no way to test their effectiveness.
I recommend you use a different MCU, or a different tool chain.
There is no mikroE dev board or mikroE programmer support.
Here is my pathetic attempt at LED blink on all pins, for what it is worth (nothing).
Seems to work on simulator, but no idea if it would work on real hardware.
I see that UART library functions can be selected, but I have no way to test their effectiveness.
I recommend you use a different MCU, or a different tool chain.
Code: Select all
// simple pin test program for obscure, unpopular AVR ATtiny417
// totally untested - no idea what I am doing - wild guesses only
void main() {
CTRLA = 0; // watchdog turned off
DIR_PORTA = 0xff; // all output
DIR_PORTB = 0xff; // all output
DIR_PORTC = 0xff; // all output
OUT_PORTB = 0; // all PORTB outputs low to start with
while(1){
OUT_PORTA = 0x55; // LED pattern 1
OUT_PORTB = 0x55; // LED pattern 1
OUT_PORTC = 0x55; // LED pattern 1
Delay_ms(500); // allow time to see LEDs change
OUT_PORTA = 0xaa; // LED pattern 2
OUT_PORTB = 0xaa; // LED pattern 2
OUT_PORTC = 0xaa; // LED pattern 2
Delay_ms(500); // allow time to see LEDs change
}
}
Start every day with a smile...... (get it over with)