Migrating from AtMega328 to AtMega644p

I have a robot which used a AtMega 328/L 40pin until recently when I needed more resources, so I moved to the Atmega 644p. The registers and bit names are different between the two and to be honest I just cannot get the new one to work properly. I am certain I have followed the changes as stated in the datasheet, but feel that my lack of knowledge in standing in the way. Here is the 328 function that did work: { portInit(); // Setup port directions and initial values. // This is the most important step! cli(); // Disable global interrupts. // UART: UBRRH = UBRR_BAUD_LOW >> 8; // Setup UART: Baud is Low Speed UBRRL = (uint8_t) UBRR_BAUD_LOW; UCSRA = 0x00; UCSRC = (1<> 8; // Setup UART: Baud is Low Speed //UBRR0L = (uint8_t) UBRR_BAUD_LOW; //UCSR0A = 0x00; //UCSR0C = ((1<What doesn't work about it and how do you know/what do you look for to know that it does not work? Have you tried a completely fresh test project where you just set up the peripheral you want to use so you can figure out how it is supposed to be set up? PS, I added the embedded tag.

以上就是Migrating from AtMega328 to AtMega644p的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏