View previous topic :: View next topic |
Author |
Message |
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
Posted: Mon Jul 18, 2016 10:06 pm Post subject: mega168PA vs 168PB |
|
|
Hello!
Migrating from mega8 to mega168pb I encoutered some strange behavior.
After a power-on reset MCU is not able to init the HTRC110 hitag IC properly - the read range is zerro. If I do a HW reset, MCU resets and now, HTRC110 IC isbeing configured right - read range is now 4 to 6 cm, as expected.
I use m168pdef.dat Is that ok for a 168PB MCU ? I took a look at both datasheets, and I'am not sure, what is the differece between them.
Code: |
'**********************************
$regfile = "m168pdef.dat"
$crystal = 11059200
$baud = 9600
$hwstack = 100
$swstack = 100
$framesize = 100
Thanks!
BR
Andrej
Config Hitag = 64 , Type = Htrc110 , Dout = Pind.2 , Din = Pind.3 , Clock = Pind.4 , Int = @int0
|
(BASCOM-AVR version : 2079 , Latest : 2.0.7.8 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Jul 18, 2016 10:35 pm Post subject: |
|
|
attached the PB dat file. but other than some new regs for some new hardware, i see no problem.
but that said : notice the VCC and GND pad changes between m168P and PB for the new hardware! _________________ Mark |
|
Back to top |
|
|
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
Posted: Tue Jul 19, 2016 6:36 am Post subject: |
|
|
Hi Marc!
Thanks for Your ultra-quick respons. Yesterday I started to compare existing p.dat and pb datasheet... But more concerning is vcc/gnd pinout comment, that You gave to me... That's something I did not check yet. I'll report whether it is .dat or the pinout problem.
BR
Andrej |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
Posted: Tue Jul 19, 2016 8:57 am Post subject: |
|
|
Hi!
Thanks for the link, Evert. I was able to find this link yesterday http://www.atmel.com/Images/doc8196.pdf, but the one, You sent today is what I was looking for.
Those additional PE0 and PE1 are now tight to Vcc and GND (I did the layout on mega8 pinout base) , but I think, this may not cause any problems.
BR
Andrej |
|
Back to top |
|
|
hgrueneis
Joined: 04 Apr 2009 Posts: 902 Location: A-4786 Brunnenthal
|
Posted: Sat Jul 30, 2016 8:32 pm Post subject: |
|
|
Not much changed?????
Take a look at the "Alternate Functions of Port E" on page 122 of the full Datasheet!
Pins 3, 6, 19 and 22 changed and or added many functions.
PE3 ADC7, T3, MOSI1, PCINT27
PE2 ADC6, ICP3, SS1, PCINT26
PE1 T4, SCL1, PCINT25
PE0 ACO, ICP4, SDA1, PCINT24
Also see overriding signals on Page 123 with a Master/Slave select SPI
Have fun
Hubert |
|
Back to top |
|
|
hgrueneis
Joined: 04 Apr 2009 Posts: 902 Location: A-4786 Brunnenthal
|
Posted: Sat Jul 30, 2016 9:20 pm Post subject: |
|
|
I use the Atmega168 (AU and PU versions) a lot in my projects.
@Mark Alberts,
the alternate functions of port E bits 0-3 seem to be not implemented in the new m168PBdef.dat.
Looking through the file, I could not find any other than Port, Pin and DDR definitions.
There should be the PCINT's, SPI1, Master/Slave select, TWI1, counter inputs T3, T4, ACO, ......
For example PCINT stops at 23.
There is on Port E 24 to 27.
Did I just not find it because of differing names, or will it be added at a later time?
It is a significant improvement of the chip and adds functions to otherwise useless pins.
Currently it seems that we can only use Port E as general I/O.
It also sometimes would allow the use of the 168PB chip instead of a larger and more expensive one.
Please correct me if I am wrong.
Thanks
Hubert |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Sat Jul 30, 2016 9:58 pm Post subject: |
|
|
hgrueneis wrote: | Not much changed?????
|
The ts was migrating from the mega8 to mega168pb and encountered some strange behavior.
My "Not much special changed" was regarding the downwards compatibility with the m8 and this should give no problems.
I think the same with the def file Marc created quickly (within 30 minutes), only to make it downwards compatible and helping the ts going on .
Hopefully Marc has some time to implement the new features also in the def file. _________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
jure_m
Joined: 14 Jan 2005 Posts: 68 Location: Ljubljana
|
Posted: Mon Sep 24, 2018 6:50 am Post subject: |
|
|
Hi,
does any of you have updated/new DEF file for Mega168PB? This chip does have a bunch of new features that Mega168 does not have.
Best regards
Jure |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Sep 24, 2018 10:15 am Post subject: |
|
|
attached the official dat file. _________________ Mark |
|
Back to top |
|
|
|