On 7/3/2014 11:43 PM, Greg King wrote: > On 2014-07-03 12:40 AM, Jim Brain wrote: >> >> static inline __attribute__((always_inline)) void read_data(void) { >> TEST_OFF(); >> . . . >> TEST_ON(); >> } > > Two more tests: > > 1) The RESET voltage needs to be dropped to 5V only on the cycles when > the mask ROM is read. So, comment out those two calls; and, see if it > makes a difference (I hope that it doesn't; but, we need to be sure). Removed. no change. > > 2) Try adding a half-cycle phase shift (relative to the internal clock): > After the RESET line is raised to 10V, delay for one external-clock > cycle, then start sending the byte sequence. Sadly, no change. But, instead of stopping there, I decided to diagnose my test harness a bit. And, I found that I had accidentally turned on JTAG on this AVR via the fuse settings, and so the incorrect opcodes were being sent. Fixed, and... SUCCESS! A couple notes: I was able to reduce the code to this and it still works: uint8_t i = 0; while(1) { RESET_ON(); send_data(0xEA); send_data(0xEA); send_data(0xEA); send_data(0xEA); send_data(0xEA); // it'll reset without these 4, but if I try to run the loop, it will die after a bit. Adding these back in makes everybody happy. send_data(0xEA); send_data(0xEA); send_data(0xEA); i++; TEST_ON(); send_data(0xEA); send_data(0xEA); send_data(0xEA); send_data(0x2C); send_data(0x24); send_data(0xEA); send_data(0xEA); send_data(0x78); send_data(0x78); send_data(0xA9); send_data(i); send_data(0x85); send_data(0x80); // I switched to PORTA a while back, because I thought PORTD might have issues. I could go back, but not going to bother now. //read_data(); // data is valid here, not sure why, but using the uart is not an option, so I commented it out. send_data(0x80); send_data(0x02); } As expected, the LA screen (using a new LA) fills with the impressive 00-ff pattern... Thanks to all for the ML code. I never would have figured that part out (well, maybe I would have, but I would have probably quit out of frustration before I did so) I tweaked the code a bit: #ifdef IMMEDIATE send_data(0xA9); send_data(i); #else send_data(0xad); send_data(i); send_data(0xf); TEST_OFF(); send_data(0); TEST_ON(); #endif And ran the code 16 times to read out RAM/ROM. I got two different reading for page 2 and 3, so I need to determine which bytes are different and I can read them out by themselves, but it's 3AM here, and I've worked on this all night, so maybe someone else can help... zpage: AA65AAD5BAD5AA01AA05AA61AA54AAC4AA75AA308EF4AA54A8D5AA55AA5028D1AABDAA16AAC4AADFAA55A870A837AA12A8D5A844AAD38B108A54BA042A5CAA4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780 page1: 0300AAD5BA95AA01AA05AA61AA54AAC4AA75AA308EF4AA54A8D5AA57AA5028D5AABDAA062AC4AADFAA51A870A837005EA8D5A844FF008B108A54BA042A5CAA5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780 page2: 0365AAD5BA95AA01AA05AA61AA54AAC4AA75AA308EF5AA54A8D5AA55AA5028D5AABDAA062AC4AADFA251A870A837AA12A8D5A844AAD383108A54BA040A5CAA4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780 page2 (another run) 0300AAD5BA95AA01AA05AA61AA54AAC4AA75AA308EF4AA54A8D5AA57AA5028D5AABDAA062AC4AADFAA51A870A837005EA8D5A844FF008B108A54BA042A5CAA5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780 page3 0365AAD5BA95AA01AA05AA61AA54AAC4AA75AA308EF5AA54A8D5AA55AA5028D5AABDAA062AC4AADFA251A870A837AA12A8D5A844AAD383108A54BA040A5CAA4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780FFFF00FF070700000707070707070780 page3 (another run) 0300AAD5BA95AA01AA05AA61AA54AAC4AA75AA308EF4AA54A8D5AA57AA5028D5AABDAA062AC4AADFAA51A870A837FF5EA8D5A80080FF8B108A54BA042A5CAA5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780FFFF7FFF070700000707070707070780 page4 A920D002A9400580D00AA9DF25808580A9BF25808580A580C580D0FA4A6A6020AA0BF05BC90AF057C98DF05CC9FFD002A9DEC922D002E6194518852C297F38E920B00EA5192901851AF02DA52C297F0920C940B023C9209006A62C1002691F852C20230F900320640F20610D461A900820810FA25C20630DA52DF0A34CF40A20640F8619861AF0F0208C0FF0EB20AA0B861FC949D00320770FC948D00320810FC94DF00EC952F00AC944F004C94AD01EE61F4820D10C8406850720D10C84088509682904F00520EA0DF00320D70D4C9D0BA9038515204B0D20A40BF057C92EF04EC92DD002C61420540DB0EC4806122613A612A4130612261306122613188A65 page5 12851298651385136818651285129002E613C615F01920A40BF01920540D90CCC945D003204B0DC920F009C92CF00520A40BD0ECA412A513A614F00E489849FFA86849FFC8D00318690160A90085148512851360AA38E9309004C90A90028A3860A62CE8A9088517A0008416B1161003CAF008E616D0F5E617D0F120770FA001B116851B4AAA29078508A900850785092A851F8A4A4A4A29078506A61BE8F00EA521F00AA408A506490785088406A61CF00B0606260706082609CAD0F520D70DE616D002E617A51B10B4C9FFF008A9FF851BA9E0D0AE60A20218B506750E9506B507750F9507CACAF0EFA20238B506F50A9506B507F50B9507CACAF0EFA202B4 page6 06B50795261007203C0D95079406CACAF0ED38A508E506A509E507A90085232A2AAAB50785034A8501B50685026A85008A4902AA852AB5068504B5078505A5060507D007A5080509D02D60A5080509F01338A500E5048500A501E50585019008A52AF013E625D01118A50065028500A50165038501E625E627A202B5263003200C0FB40AB50B1003203C0D489838E9E768E903B0088AD00C20230F9007261F38661F300EB525F016B5263004F629F629D629B525F008B506D002D607D606B5261003200C0FCACAF0B2A51F10052901851F4AF010A622F010A523D0248623A5202901F004A2FED002A2FDE420F012E0FDF00320470F8682862020470FA9FF8582 page7 202D0F85258527C6234C3E0EB425F0090AB007F60AD002F60B60B50AD002D60BD60A6038A50AE9E0A50BE90160A5292903A8B95C0F48A52B2903A86819600F8583A966A00AD00AA987A012D004A976A02C85858488A58F10FCA90060090A060590A06050208C0FA61CE8A9050ACAD0FC850C860D209A0FA204B509950DCAD0F960A204B50D9505CAD0F9F00EA90085068507A50C8508A50D8509A900851F4CEA0DE61EA51E2903851EA51DC51EF03EA50A48A50B4820E40E208C0FA23C20E50F20E00F20E00FA23C20F00FE61DA51D2903851DC51ED0E46885076885064C920F20EE0FA21EC629202D0FCAD0F860A21EE629202D0FCAD0F860AA950A950A950A page8 FF802225353323262F3F37A71E1D3EBD141D3C3546070ACB14354739190B1D3D2EA3044D1C0D0B1B1D36474535B7420B0D1F2D2B07051323C72AAF3223151D2FBF2233454D3FAF044D0C452CA5242D08C92033352523B308C922253533A302DD044D3F1F0D05133345CD1C2F2312B30C1F3F4D4B03C30C1F3F4D4B3929384745331385323F0907C704133345493B0B0FCF081B3B49453313050D1F3FCD024B4F8F180B0D1F3F4D4B3947453313050719B9041333454D3F1F0D0B1939CB14172725151A1D2D2B9B1225271715252A2D1D1BAB4219CF16471ACB12499F0C1F3F4D4B39292724A3363B1B1535474B3D1D0B0513C3020B2F4B4308C9020F3F4D4B39 page9 083947453383443313050D1F3FCD020F3F4D45338342030F4F3889020F4F08B94C3F1F0D05134349A9020F4E4308C91233222F1EBF04132335BF020F4E0718C30E03C3020F2B292B4FC3020F0C454EC3040D1F3F4D45331385020F3F4D4B398926433213050D1F3F4D45B3020F3F4D4B390918C3041333454739190B0D1F3FCD222F0ECF0E05133345CF0E072347CF0E0327282743CF02054D4F0E0D45C322294D4F0E0DA90E4F4D0503C322030FAF5C4D3B3523130517335328C912333F9F222D082DC924092D08D908F934231305071929370A2B3935C30E032335392B8B34231305091B2BB93A1B09051333BF0637392B1B090513B3222F3F18B902112133 pageA 392B1B09071525B7020F0A2B39B322292AAD02112133393ABD32170E0304BB1E13A3020B081B2923283B49C3020B091B2B39B304091B2B3935231385042537392B0B8140313B1B090715B50A1913182BBB041323352717091B2BB90A2B1E13A30A0333BB0A072347CB0A05132527253345CB024B0AC30A09254A49810A4B03C330BF70810239638306193933121939CB020F5F538378A23F9AA9BF8580A2FF86818682E88683A9E0858F8AA23D9500CAD0FB20670FA90485154A851CA28B20E50FC615D0F7A90C851520E00FA582100EC615D0F5CA8681204D0F8583F0F6A23E20F00F20A10FA25F20630DA51ED0F4C61C20640F204D0F8583200A0CA58110F1 pageB 0A300520A10FF0EC0A300BA9E08506A9018507209A0F20160C10E120040C20000C20410F20AA0BA5812907186924C52CF00720100C30FB10C020160CB0FBA960852C20160C100320AA0BA52C29F0C960D0E0A52C29070AA8B96A0B48B9690B48C004900420D10C98601E0C8C0C780B810B870B8B0B910B940A2903851E20A90FF01B2903851C101585211011290F8522100B29014A6A8518900320AA0BA52DF0F94CF40AA52D49FFF05520160CB0FB20100C2920D0F9852DA20920160CB010CAD0F820040CC62DA207CAD0FD20100CA208A5802902F0FAA5802902D0FAA58049FF0A662CCAD0EA20160C90FB20040CA214CAD0FDA52D1003200A0CA52CC90D60 pageC A920D002A9400580D00AA9DF25808580A9BF25808580A580C580D0FA4A6A6020AA0BF05BC90AF057C98DF05CC9FFD002A9DEC922D002E6194518852C297F38E920B00EA5192901851AF02DA52C297F0920C940B023C9209006A62C1002691F852C20230F900320640F20610D461A900820810FA25C20630DA52DF0A34CF40A20640F8619861AF0F0208C0FF0EB20AA0B861FC949D00320770FC948D00320810FC94DF00EC952F00AC944F004C94AD01EE61F4820D10C8406850720D10C84088509682904F00520EA0DF00320D70D4C9D0BA9038515204B0D20A40BF057C92EF04EC92DD002C61420540DB0EC4806122613A612A4130612261306122613188A65 pageD 12851298651385136818651285129002E613C615F01920A40BF01920540D90CCC945D003204B0DC920F009C92CF00520A40BD0ECA412A513A614F00E489849FFA86849FFC8D00318690160A90085148512851360AA38E9309004C90A90028A3860A62CE8A9088517A0008416B1161003CAF008E616D0F5E617D0F120770FA001B116851B4AAA29078508A900850785092A851F8A4A4A4A29078506A61BE8F00EA521F00AA408A506490785088406A61CF00B0606260706082609CAD0F520D70DE616D002E617A51B10B4C9FFF008A9FF851BA9E0D0AE60A20218B506750E9506B507750F9507CACAF0EFA20238B506F50A9506B507F50B9507CACAF0EFA202B4 pageE 06B50795261007203C0D95079406CACAF0ED38A508E506A509E507A90085232A2AAAB50785034A8501B50685026A85008A4902AA852AB5068504B5078505A5060507D007A5080509D02D60A5080509F01338A500E5048500A501E50585019008A52AF013E625D01118A50065028500A50165038501E625E627A202B5263003200C0FB40AB50B1003203C0D489838E9E768E903B0088AD00C20230F9007261F38661F300EB525F016B5263004F629F629D629B525F008B506D002D607D606B5261003200C0FCACAF0B2A51F10052901851F4AF010A622F010A523D0248623A5202901F004A2FED002A2FDE420F012E0FDF00320470F8682862020470FA9FF8582 pageF 202D0F85258527C6234C3E0EB425F0090AB007F60AD002F60B60B50AD002D60BD60A6038A50AE9E0A50BE90160A5292903A8B95C0F48A52B2903A86819600F8583A966A00AD00AA987A012D004A976A02C85858488A58F10FCA90060090A060590A06050208C0FA61CE8A9050ACAD0FC850C860D209A0FA204B509950DCAD0F960A204B50D9505CAD0F9F00EA90085068507A50C8508A50D8509A900851F4CEA0DE61EA51E2903851EA51DC51EF03EA50A48A50B4820E40E208C0FA23C20E50F20E00F20E00FA23C20F00FE61DA51D2903851DC51ED0E46885076885064C920F20EE0FA21EC629202D0FCAD0F860A21EE629202D0FCAD0F860AA950A950A950A Hopefully this helps someone... Jim Message was sent through the cbm-hackers mailing listReceived on 2014-07-04 10:00:02
Archive generated by hypermail 2.2.0.