From richard at imagecraft.com Fri Feb 1 13:12:59 2008 From: richard at imagecraft.com (Richard Man) Date: Fri Feb 1 13:28:59 2008 Subject: [Icc-avr] [Fwd: Have you used Salvo or another RTOS for your ATMega projects? I need your opinion!] Message-ID: <200802012128.m11LSwRt005099@dragonsgate2.imagecraft.com> An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080201/a949b6cf/attachment.html From patchell at cox.net Fri Feb 1 22:27:02 2008 From: patchell at cox.net (Jim Patchell) Date: Fri Feb 1 22:41:55 2008 Subject: [Icc-avr] [Fwd: Have you used Salvo or another RTOS for your ATMega projects? I need your opinion!] In-Reply-To: <200802012128.m11LSwRt005099@dragonsgate2.imagecraft.com> References: <200802012128.m11LSwRt005099@dragonsgate2.imagecraft.com> Message-ID: <47A40D36.3000702@cox.net> I have used Salvo in quite a few projects using ICCAVR. Salvo is...well, a little different, as real time operating systems go. It is, however, quite effective. It is not a preemptive operating system. You have to keep this in mind while using it. It uses a single stack, which on a small micro is a good thing. This is the trade off you make. It has a few quirks that I found took a while to get used to, since I had used an RTOS on a big 68000 based system before, and kept trying to do things that Salvo just can't do. For instance...you can only suspend at the very top level of your task. This quirk does make it a bit messy, and I found the best way to deal with this is by throwing more tasks at the problem...since with Salvo, more tasks are very cheap...(with a preemptive OS, each task has a significant cost in RAM resources). The last time I used Salvo was on a Motion Control System, however it also had an FPGA (xilinx) in it that did the profile generation for the Stepper motors and well as provided the step and direction pulses to the motor controller. The profile generator would generate an interrupt when the profile was done, and the interrupt routine would post the appropriate semaphore so that the next motion profile would be started...(and oh yes...this thing was doing about 12 axis)... The only thing that scare me a bit about your requirements is the "checking every 50uS" bit...that might be possible with Salvo, but I never did anything quite that aggressive with it. Hope this helps... -Jim Richard Man wrote: > For some reaqons, Dan cannot post directly tot he list. I will try to > track it down. Any mailman guru out there :-)? > > >> Subject: Have you used Salvo or another RTOS for your ATMega projects? >> I need your opinion! >> Date: Tue, 29 Jan 2008 07:51:56 -0700 >> From: Dan Mullin >> To: icc-avr@imagecraft.com >> >> >> >> Folks, >> >> I have been writing using ImageCraft C for a number of years and love >> it. Its clean, reliable, and quick. However, my code has simply started >> reaching the point where it is becoming unmanageable. All my projects >> have been written in an "in-line loop" with the typical ISR's >> popping >> off as required but I am finding I simply have a lot of stuff that needs >> to be in the loop but really doesn't need to be checked all that often. >> I am trying to make the decision as to whether an RTOS would help things >> or simply muddy the waters even more. >> >> Most of these applications are based on the ATMega 128 or 2561. They all >> involve motion control, reading encoders quickly, doing realtime PWM >> accel/decel on stepper and brush motors, reading user input via a UART, >> responding back, retrieving and updating parameters, etc, etc. I have a >> few items that must be checked as quickly as once every 50uS and others >> that only need a peak every 100ms or so. Of course, I need to handle the >> UART I/O on both UART's and, possibly, on a third if I step up to the >> 2560. >> >> Have any of you found a distinct advantage from the standpoint of >> simplifying code structure and reusability of code? Does an RTOS have >> the capability to handle things this quickly? How painful was the >> transition from a sequential loop structure to an RTOS? Any feedback >> would be greatly appreciated. >> >> Thanks, >> >> Dan Mullin >> Automated Systems Engineering, Inc. >> > > // richard < http://www.imagecraft.com/> > < http://www.dragonsgate.net/mailman/listinfo> On-line orders, support, > and listservers available on web site. > [ For technical support on ImageCraft products, please include all > previous replies in your msgs. ] > > > ------------------------------------------------------------------------ > > _______________________________________________ > Icc-avr mailing list > Icc-avr@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-avr From Albert.vanVeen at pertronic.co.nz Sun Feb 3 14:10:09 2008 From: Albert.vanVeen at pertronic.co.nz (Albert vanVeen) Date: Sun Feb 3 14:25:02 2008 Subject: [Icc-avr] 4-line LCD display In-Reply-To: <479F5F66.7070808@zetnet.co.uk> References: <000a01c8599f$f4cb85b0$b160ec82@Shagrat> <47977E79.8090900@goase.com> <479DC055.4000104@zetnet.co.uk> <479F5F66.7070808@zetnet.co.uk> Message-ID: To keep you informed: We tried the hardware suggestions, and I experimented with various timings. It appears that around the christmas break we changed supplier, and now we're havinf this strange behaviour of about 2 in 5 units failing. This very strongly points to that supplier, but I can't see how they would then not be flooded with complaints. Anyway, it is currently labeled "hardware problem", so I don't care anymore (only joking). Albert. -----Original Message----- From: icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] On Behalf Of John Baraclough Sent: Wednesday, January 30, 2008 06:16 AM To: Discussion list for ICCAVR and ICCtiny Users. You do NOT need tosubscribe to icc-announce if you are a member of this. Subject: Re: [Icc-avr] 4-line LCD display Hi Albert, What processor clock frequency are you using? I have found that a small delay is required between the rising and falling edges of the E clock on the HD44780. Also you have only written the setup byte to the device once and I have also found that it requires two writes to be sure of setting the correct operating mode. I have attached a couple of files that I have used for several years without a problem. If you don't see the files let me know and I'll email them direct to you. All the best for now, John Albert vanVeen wrote: > Thanks, especially for hw suggestions; we're looking at it. > Meanwhile here is my init code for your perusal. > > > Scanned by Bizo Email Filter From jh.bodin at telia.com Mon Feb 4 02:34:00 2008 From: jh.bodin at telia.com (Johan H. Bodin) Date: Mon Feb 4 02:49:00 2008 Subject: [Icc-avr] 4-line LCD display In-Reply-To: References: <000a01c8599f$f4cb85b0$b160ec82@Shagrat> <47977E79.8090900@goase.com> <479DC055.4000104@zetnet.co.uk> <479F5F66.7070808@zetnet.co.uk> Message-ID: <47A6EA18.2040904@telia.com> Albert vanVeen wrote: > We tried the hardware suggestions, and I experimented with various > timings. > It appears that around the christmas break we changed supplier, and now > we're havinf this strange behaviour of about 2 in 5 units failing. Hi Albert, From my own experience with the HD44780 (and work-alike chips), I know that the E clock signal must have very fast rise and fall times. A weak driver in combination with a long cable *will* cause trouble... Hitachi's HD44780 data sheet specifies 25ns maximum rise/fall times on the E signal! To find out if this is the problem, you can try a non-inverting schmitt trigger in the E line, close to the LCD module. Two 74HC14 inverters in series will do (or a single one if you invert the E signal in the software). Regards Johan Bodin From Jeff.Milender at goodrich.com Tue Feb 5 11:17:55 2008 From: Jeff.Milender at goodrich.com (Milender, Jeff) Date: Tue Feb 5 11:33:37 2008 Subject: [Icc-avr] Placing text in an absolute locations in the AT90CAN128 Message-ID: I'm sure that this has been covered here but I couldn't find anything in the archives. I'm using ICCAVR 7.00, and my processor is an AT90CAN128 How do I go about placing a const String into Flash at an absolute location? In the example below I am trying to place a Software Part Number in FLASH starting at address 0x0100. Here is what I thought would work but I get an error message "Code address 0x100 already contains a value" #pragma text:mytext const INT8U SWPartNumber[24] = {"GCP787S014-001"}; #pragma text:text With the following in the Project Options set to: -bmytext:0x100 Thanks Jeff Jeff Milender Systems Engineer Cargo Systems Goodrich Interiors 2604 Highway 20 North Jamestown, ND 58401 Tel: 701-253-7569 jeff.milender@goodrich.com www.goodrich.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080205/cf4b3552/attachment.html From richard-lists at imagecraft.com Tue Feb 5 12:18:29 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Tue Feb 5 12:33:50 2008 Subject: [Icc-avr] Placing text in an absolute locations in the AT90CAN128 In-Reply-To: References: Message-ID: <200802052033.m15KXmCj063395@dragonsgate2.imagecraft.com> An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080205/1467fb00/attachment.html From richard at imagecraft.com Tue Feb 5 12:28:14 2008 From: richard at imagecraft.com (Richard Man) Date: Tue Feb 5 12:43:33 2008 Subject: [Icc-avr] 7.16 BETA0 Message-ID: <200802052043.m15KhWNB063512@dragonsgate2.imagecraft.com> Now you can create library project using the IDE! http://www.imagecraft.com/pub/iccv7avr_v716_beta0.exe V7.16 IDE - [ADV and PRO only] Added capability to create Library projects. Compiler - 7.15 incorrectly gives error on extern __flash ; without initialization. // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] From Jeff.Milender at goodrich.com Tue Feb 5 12:44:55 2008 From: Jeff.Milender at goodrich.com (Milender, Jeff) Date: Tue Feb 5 13:00:11 2008 Subject: [Icc-avr] Placing text in an absolute locations in the AT90CAN128 In-Reply-To: <200802052033.m15KXmCj063395@dragonsgate2.imagecraft.com> References: <200802052033.m15KXmCj063395@dragonsgate2.imagecraft.com> Message-ID: Not sure way but this seems to work if I add the -bfunc_lit:0x100.20000 after "my areas" with the setting still as AT90CAN128. -bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000 With this in main.c // FLASH Assignment of Absolute Addresses // "mytest" is placed at 0x50 in the AVR project file // -bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000 #pragma text:mytext // located @ 0x050 const INT16U APP_CHECKSUM_VALUE = 0x01234; // located @ 0x052 const INT16U APP_CRC_VALUE = 0x0ABCD; // located @ 0x054 {((0x01FFFF - 0x0100) + 1) + ((0x04F - 0x00) + 1)} const INT32U APP_LENGTH = 0x01FF50; #pragma text:text #pragma text:mytext1 // Located @ 0x070 const INT8U SWPartNumber[24] = {"GCP787S014-001"}; #pragma text:text The map is then Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ mytext 0050 0008 = 8. bytes (rel,con,rom) Addr Global Symbol ----- -------------------------------- 0050 _APP_CHECKSUM_VALUE 0052 _APP_CRC_VALUE 0054 _APP_LENGTH 0058 __mytext_end Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ mytext1 0070 0018 = 24. bytes (rel,con,rom) Addr Global Symbol ----- -------------------------------- 0070 _SWPartNumber 0088 __mytext1_end I guess I will have to get the bootloader updated and try this. Thanks Jeff Jeff Milender Systems Engineer Cargo Systems Goodrich Interiors 2604 Highway 20 North Jamestown, ND 58401 Tel: 701-253-7569 jeff.milender@goodrich.com www.goodrich.com ________________________________ From: icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] On Behalf Of Richard Man Sent: Tuesday, February 05, 2008 2:18 PM To: Discussion list for ICCAVR and ICCtiny Users. You do NOT need tosubscribe to icc-announce if you are a member of this. Subject: Re: [Icc-avr] Placing text in an absolute locations in the AT90CAN128 Jeff, you can put things in arbitrary address, or put another way, the linker doesn't create a hole for you, so 0x100 is already used for text area purpose. You should look at the .mp file, and find an address well outside of your normal usage, then you can use that. You can also put it at the beginning of your normal flash, after the vectors, but then you need to change your device setting to Custom and change the starting address accordingly. Hope this helps. At 11:17 AM 2/5/2008, Milender, Jeff wrote: I'm sure that this has been covered here but I couldn't find anything in the archives. I'm using ICCAVR 7.00, and my processor is an AT90CAN128 How do I go about placing a const String into Flash at an absolute location? In the example below I am trying to place a Software Part Number in FLASH starting at address 0x0100. Here is what I thought would work but I get an error message "Code address 0x100 already contains a value" #pragma text :mytext const INT8U SWPartNumber[ 24 ] = { "GCP787S014-001" } ; #pragma text :text With the following in the Project Options set to: -bmytext:0x100 Thanks Jeff // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080205/b4e2df28/attachment-0001.html From richard-lists at imagecraft.com Tue Feb 5 13:07:54 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Tue Feb 5 13:23:15 2008 Subject: [Icc-avr] Placing text in an absolute locations in the AT90CAN128 In-Reply-To: References: <200802052033.m15KXmCj063395@dragonsgate2.imagecraft.com> Message-ID: <200802052123.m15LNEP9064257@dragonsgate2.imagecraft.com> Yup, this will work, since the -bfunc_lit you added effectively overrides the one from the IDE. At 12:44 PM 2/5/2008, you wrote: >Not sure way but this seems to work if I add the >?bfunc_lit:0x100.20000 after ?my areas? with the setting still as AT90CAN128. > >-bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000 > >With this in main.c >// FLASH Assignment of Absolute Addresses >// "mytest" is placed at 0x50 in the AVR project file >// -bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000 >#pragma text:mytext >// located @ 0x050 >const INT16U APP_CHECKSUM_VALUE = 0x01234; >// located @ 0x052 >const INT16U APP_CRC_VALUE = 0x0ABCD; >// located @ 0x054 {((0x01FFFF ? 0x0100) + 1) + ((0x04F ? 0x00) + 1)} >const INT32U APP_LENGTH = 0x01FF50; >#pragma text:text > >#pragma text:mytext1 >// Located @ 0x070 >const INT8U SWPartNumber[24] = {"GCP787S014-001"}; >#pragma text:text > >The map is then >Area Addr Size Decimal Bytes (Attributes) >-------------------------------- ---- ---- ------- ----- ------------ > mytext 0050 0008 = 8. bytes (rel,con,rom) > > Addr Global Symbol > ----- -------------------------------- > 0050 _APP_CHECKSUM_VALUE > 0052 _APP_CRC_VALUE > 0054 _APP_LENGTH > 0058 __mytext_end > >Area Addr Size Decimal Bytes (Attributes) >-------------------------------- ---- ---- ------- ----- ------------ > mytext1 0070 0018 = 24. bytes (rel,con,rom) > > Addr Global Symbol > ----- -------------------------------- > 0070 _SWPartNumber > 0088 __mytext1_end > >I guess I will have to get the bootloader updated and try this. > >Thanks >Jeff > // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) From jassenbaum at htp-tel.de Tue Feb 5 14:48:01 2008 From: jassenbaum at htp-tel.de (Johannes Assenbaum) Date: Tue Feb 5 15:03:34 2008 Subject: [Icc-avr] 7.16 BETA0 References: <200802052043.m15KhWNB063512@dragonsgate2.imagecraft.com> Message-ID: You were faster again :-) I just was finishing another iccv7avr feature: gcc-like "iccioavr.h" file finding io header files by -DATxxx compiler switch. Please take a look at file attached and tell me your opinion about "ioavr.h for icc" at all. Best regards, Johannes > Now you can create library project using the IDE! > http://www.imagecraft.com/pub/iccv7avr_v716_beta0.exe > V7.16 > IDE > - [ADV and PRO only] Added capability to create Library projects. > Compiler > - 7.15 incorrectly gives error on > extern __flash ; > without initialization. > // richard > On-line orders, > support, and listservers available on web site. > [ For technical support on ImageCraft products, please include all > previous replies in your msgs. ] > _______________________________________________ > Icc-avr mailing list > Icc-avr@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-avr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 988 bytes Desc: not available Url : http://dragonsgate.net/pipermail/icc-avr/attachments/20080205/81a90279/attachment.obj From richard-lists at imagecraft.com Tue Feb 5 16:21:02 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Tue Feb 5 16:36:22 2008 Subject: [Icc-avr] 7.16 BETA0 In-Reply-To: References: <200802052043.m15KhWNB063512@dragonsgate2.imagecraft.com> Message-ID: <200802060036.m160aKqD066351@dragonsgate2.imagecraft.com> Great idea! I was about to have someone to do it. Thanks for being proactive! :-) At 02:48 PM 2/5/2008, Johannes Assenbaum wrote: >You were faster again :-) > >I just was finishing another iccv7avr feature: > >gcc-like "iccioavr.h" file finding io header files by -DATxxx compiler switch. > >Please take a look at file attached and tell me your opinion about >"ioavr.h for icc" at all. > >Best regards, >Johannes > > > > Now you can create library project using the IDE! > > > http://www.imagecraft.com/pub/iccv7avr_v716_beta0.exe > > > V7.16 > > IDE > > - [ADV and PRO only] Added capability to create Library projects. > > Compiler > > - 7.15 incorrectly gives error on > > extern __flash ; > > > without initialization. // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) From asyms at technosoft.co.uk Wed Feb 6 03:27:19 2008 From: asyms at technosoft.co.uk (Andy Syms) Date: Wed Feb 6 03:42:28 2008 Subject: [Icc-avr] 7.16 BETA0 In-Reply-To: Message-ID: Hi Johannes > Please take a look at file attached and tell me your opinion > about "ioavr.h for icc" at all. My opinion is that, already having WinZIP and WinRAR loaded on my PC's, I don't want to have to go and download yet another piece of compression software to read some other obscure format. YMMV. ;-) Regards Andy -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >> >> Andy Syms Technosoft Systems Ltd >> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> From richard-lists at imagecraft.com Wed Feb 6 04:08:44 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Wed Feb 6 04:24:13 2008 Subject: [Icc-avr] 7.16 BETA0 In-Reply-To: References: Message-ID: <200802061224.m16COCNr074518@dragonsgate2.imagecraft.com> Andy, use c:\iccv7avr\bin\7za :-) At 03:27 AM 2/6/2008, Andy Syms wrote: >My opinion is that, already having WinZIP and WinRAR loaded on my PC's, I >don't want to have to go and download yet another piece of compression >software to read some other obscure format. YMMV. ;-) > >Regards > >Andy // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) From asyms at technosoft.co.uk Wed Feb 6 04:31:56 2008 From: asyms at technosoft.co.uk (Andy Syms) Date: Wed Feb 6 04:47:09 2008 Subject: [Icc-avr] 7.16 BETA0 In-Reply-To: <200802061224.m16COCNr074518@dragonsgate2.imagecraft.com> Message-ID: > Andy, use c:\iccv7avr\bin\7za :-) Any other hidden goodies you'd like to tell us about Richard ? ;-) Do you ever go to bed??? Regards Andy -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >> >> Andy Syms Technosoft Systems Ltd >> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> From d.mullin at goase.com Wed Feb 6 04:35:45 2008 From: d.mullin at goase.com (Dan Mullin) Date: Wed Feb 6 04:50:54 2008 Subject: [Icc-avr] [Fwd: Have you used Salvo or another RTOS for your ATMega projects? I need your opinion!] In-Reply-To: <47A40D36.3000702@cox.net> References: <200802012128.m11LSwRt005099@dragonsgate2.imagecraft.com> <47A40D36.3000702@cox.net> Message-ID: <47A9A9A1.3040800@goase.com> Thanks for your input, Jim. Would anyone else want to chime in? Dan Jim Patchell wrote: > I have used Salvo in quite a few projects using ICCAVR. > > Salvo is...well, a little different, as real time operating systems go. > > It is, however, quite effective. > > It is not a preemptive operating system. You have to keep this in > mind while using it. It uses a single stack, which on a small micro > is a good thing. This is the trade off you make. > > It has a few quirks that I found took a while to get used to, since I > had used an RTOS on a big 68000 based system before, and kept trying > to do things that Salvo just can't do. For instance...you can only > suspend at the very top level of your task. This quirk does make it a > bit messy, and I found the best way to deal with this is by throwing > more tasks at the problem...since with Salvo, more tasks are very > cheap...(with a preemptive OS, each task has a significant cost in RAM > resources). > > The last time I used Salvo was on a Motion Control System, however it > also had an FPGA (xilinx) in it that did the profile generation for > the Stepper motors and well as provided the step and direction pulses > to the motor controller. The profile generator would generate an > interrupt when the profile was done, and the interrupt routine would > post the appropriate semaphore so that the next motion profile would > be started...(and oh yes...this thing was doing about 12 axis)... > > The only thing that scare me a bit about your requirements is the > "checking every 50uS" bit...that might be possible with Salvo, but I > never did anything quite that aggressive with it. > > Hope this helps... > > -Jim > > Richard Man wrote: >> For some reaqons, Dan cannot post directly tot he list. I will try to >> track it down. Any mailman guru out there :-)? >> >> >>> Subject: Have you used Salvo or another RTOS for your ATMega >>> projects? I need your opinion! >>> Date: Tue, 29 Jan 2008 07:51:56 -0700 >>> From: Dan Mullin >>> To: icc-avr@imagecraft.com >>> >>> >>> >>> Folks, >>> >>> I have been writing using ImageCraft C for a number of years and >>> love it. Its clean, reliable, and quick. However, my code has simply >>> started reaching the point where it is becoming unmanageable. All my >>> projects have been written in an "in-line loop" with the typical ISR's >>> popping off as required but I am finding I simply have a lot of >>> stuff that needs to be in the loop but really doesn't need to be >>> checked all that often. I am trying to make the decision as to >>> whether an RTOS would help things or simply muddy the waters even more. >>> >>> Most of these applications are based on the ATMega 128 or 2561. They >>> all involve motion control, reading encoders quickly, doing realtime >>> PWM accel/decel on stepper and brush motors, reading user input via >>> a UART, responding back, retrieving and updating parameters, etc, >>> etc. I have a few items that must be checked as quickly as once >>> every 50uS and others that only need a peak every 100ms or so. Of >>> course, I need to handle the UART I/O on both UART's and, possibly, >>> on a third if I step up to the >>> 2560. >>> >>> Have any of you found a distinct advantage from the standpoint of >>> simplifying code structure and reusability of code? Does an RTOS >>> have the capability to handle things this quickly? How painful was >>> the transition from a sequential loop structure to an RTOS? Any >>> feedback would be greatly appreciated. >>> >>> Thanks, >>> >>> Dan Mullin >>> Automated Systems Engineering, Inc. >>> >> >> // richard < http://www.imagecraft.com/> >> < http://www.dragonsgate.net/mailman/listinfo> On-line orders, >> support, and listservers available on web site. >> [ For technical support on ImageCraft products, please include all >> previous replies in your msgs. ] >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Icc-avr mailing list >> Icc-avr@imagecraft.com >> http://dragonsgate.net/mailman/listinfo/icc-avr > > _______________________________________________ > Icc-avr mailing list > Icc-avr@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-avr > > > __________ NOD32 2846 (20080204) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > > From Jeff.Milender at goodrich.com Wed Feb 6 06:40:22 2008 From: Jeff.Milender at goodrich.com (Milender, Jeff) Date: Wed Feb 6 06:55:57 2008 Subject: [Icc-avr] ICCAVR 7.0 IOCAN128V.h file error? Message-ID: It is an error in the file IOCAN128V.H with ICCAVR 7.00A The defines: #define DIDR1 (*(volatile unsigned char *)0x7E) #define DIDR0 (*(volatile unsigned char *)0x7F) Should be (per AT90CAN128 Rev F data sheet, and functional test on our bench) #define DIDR1 (*(volatile unsigned char *)0x7F) #define DIDR0 (*(volatile unsigned char *)0x7E) Thanks Jeff Jeff Milender Systems Engineer Cargo Systems Goodrich Interiors 2604 Highway 20 North Jamestown, ND 58401 Tel: 701-253-7569 jeff.milender@goodrich.com www.goodrich.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080206/45698b85/attachment-0001.html From jassenbaum at htp-tel.de Wed Feb 6 10:35:25 2008 From: jassenbaum at htp-tel.de (Johannes Assenbaum) Date: Wed Feb 6 10:51:04 2008 Subject: [Icc-avr] ICCAVR 7.0 IOCAN128V.h file error? References: Message-ID: Hi Jeff, find latest ioCAN128v.h attached. It's of Oct 2005, only iccavr 7.00A is still older... Best regards, Johannes > It is an error in the file IOCAN128V.H with ICCAVR 7.00A > The defines: > #define DIDR1 (*(volatile unsigned char *)0x7E) > #define DIDR0 (*(volatile unsigned char *)0x7F) > Should be (per AT90CAN128 Rev F data sheet, and functional test on our > bench) > #define DIDR1 (*(volatile unsigned char *)0x7F) > #define DIDR0 (*(volatile unsigned char *)0x7E) > Thanks > Jeff > Jeff Milender > Systems Engineer > Cargo Systems > Goodrich Interiors > 2604 Highway 20 North > Jamestown, ND 58401 > Tel: 701-253-7569 > jeff.milender@goodrich.com > www.goodrich.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 5303 bytes Desc: not available Url : http://dragonsgate.net/pipermail/icc-avr/attachments/20080206/73e09143/attachment.obj From Jeff.Milender at goodrich.com Thu Feb 7 11:34:02 2008 From: Jeff.Milender at goodrich.com (Milender, Jeff) Date: Thu Feb 7 11:56:53 2008 Subject: [Icc-avr] Placing text in an absolute locations in the AT90CAN128 Boot Loader? In-Reply-To: <200802052123.m15LNEP9064257@dragonsgate2.imagecraft.com> References: <200802052033.m15KXmCj063395@dragonsgate2.imagecraft.com> <200802052123.m15LNEP9064257@dragonsgate2.imagecraft.com> Message-ID: I'm having difficulty with the same problem I resolved yesterday but now in Boot Code. (Compiler Options/ Program Type / Boot Loader) I assumed that I would use the same approach as with the Application code, the compiler does not complain about this approach but it also does not utilize "mytext" defined area. Is there something different I will have to do to place things in absolute locations in Boot Code? (Compiler Options/ Program Type / Boot Loader) I would expect to see BOOT_CHECKSUM_VALUE located at 0x01e100 but the MAP files shows it at 0x1E136 Same with BOOT_CRC_VALUE; expect 0x01e102 map shows 1E138 and so on. C Source // ---------------------------------------------------- // // START - FLASH Assignment of Absolute Addresses // // ---------------------------------------------------- // #pragma text:mytext const INT16U BOOT_CHECKSUM_VALUE = 0x01234; const INT16U BOOT_CRC_VALUE = 0x0ABCD; const INT32U BOOT_END_ADDRESS = 0x01FFFF; const INT8U BootCodeSWPartNumber[21] = {"787S005-004"}; #pragma text:text // -------------------------------------------------- // // END - FLASH Assignment of Absolute Addresses // // -------------------------------------------------- // Compiler Options / Other Options -bmyBootData:0x300.0x301 -bdata:0x100.0x2ff:0x302.0x10ff -bmytext:0x1e100.0x1e11d -bfunc_lit:0x1e11e.0x20000 MP file Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ lit 1E11E 0035 = 53. bytes (rel,con,rom) Addr Global Symbol ----- -------------------------------- 1E11E __lit_start 1E11E _BootReqID 1E122 _FlashDataID 1E126 _BootAckID 1E12A _HWPNMsgID 1E12E _SWPNMsgID 1E132 _HWSNMsgID 1E136 _BOOT_CHECKSUM_VALUE 1E138 _BOOT_CRC_VALUE 1E13A _BOOT_END_ADDRESS 1E13E _BootCodeSWPartNumber 1E153 __lit_end Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ myBootData 0300 0001 = 1. bytes (rel,con,ram) Addr Global Symbol ----- -------------------------------- 0300 _JmpToBootFlag 0301 __myBootData_end User Base Address Definitions vector = 0x1e000 func_lit = 0x1e11e data = 0x100 eeprom:1.4096 myBootData = 0x300 mytext = 0x1e100 Thanks Jeff Jeff Milender Systems Engineer Cargo Systems Goodrich Interiors 2604 Highway 20 North Jamestown, ND 58401 Tel: 701-253-7569 jeff.milender@goodrich.com www.goodrich.com -----Original Message----- From: icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] On Behalf Of Richard Man Sent: Tuesday, February 05, 2008 3:08 PM To: Discussion list for ICCAVR and ICCtiny Users. You do NOT need tosubscribe to icc-announce if you are a member of this. Subject: RE: [Icc-avr] Placing text in an absolute locations in the AT90CAN128 Yup, this will work, since the -bfunc_lit you added effectively overrides the one from the IDE. At 12:44 PM 2/5/2008, you wrote: >Not sure way but this seems to work if I add the >-bfunc_lit:0x100.20000 after "my areas" with the setting still as AT90CAN128. > >-bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000 > >With this in main.c >// FLASH Assignment of Absolute Addresses >// "mytest" is placed at 0x50 in the AVR project file >// -bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000 >#pragma text:mytext >// located @ 0x050 >const INT16U APP_CHECKSUM_VALUE = 0x01234; >// located @ 0x052 >const INT16U APP_CRC_VALUE = 0x0ABCD; >// located @ 0x054 {((0x01FFFF - 0x0100) + 1) + ((0x04F - 0x00) + 1)} >const INT32U APP_LENGTH = 0x01FF50; >#pragma text:text > >#pragma text:mytext1 >// Located @ 0x070 >const INT8U SWPartNumber[24] = {"GCP787S014-001"}; >#pragma text:text > >The map is then >Area Addr Size Decimal Bytes (Attributes) >-------------------------------- ---- ---- ------- ----- ------------ > mytext 0050 0008 = 8. bytes (rel,con,rom) > > Addr Global Symbol > ----- -------------------------------- > 0050 _APP_CHECKSUM_VALUE > 0052 _APP_CRC_VALUE > 0054 _APP_LENGTH > 0058 __mytext_end > >Area Addr Size Decimal Bytes (Attributes) >-------------------------------- ---- ---- ------- ----- ------------ > mytext1 0070 0018 = 24. bytes (rel,con,rom) > > Addr Global Symbol > ----- -------------------------------- > 0070 _SWPartNumber > 0088 __mytext1_end > >I guess I will have to get the bootloader updated and try this. > >Thanks >Jeff > // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) _______________________________________________ Icc-avr mailing list Icc-avr@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-avr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080207/90781aca/attachment-0001.html From Jeff.Milender at goodrich.com Fri Feb 8 06:16:18 2008 From: Jeff.Milender at goodrich.com (Milender, Jeff) Date: Fri Feb 8 12:21:33 2008 Subject: [Icc-avr] const Placement at ABS mem location in BOOT of AT90CAN128 Message-ID: How do I place "const" at absolute Memory Addresses in Boot? This works for the Application but it refuses to for the Boot. In Source: #pragma text:mytext // located @ 0x0E100 const INT16U BOOT_CHECKSUM_VALUE = 0x01234; // located @ 0x0E102 const INT16U BOOT_CRC_VALUE = 0x0ABCD; #define END_EXCLUDE_AREA 0x0E103 // located @ 0x0E104 const INT32U BOOT_END_ADDRESS = 0x0FFFF; // Located @ 0x0E108 const INT8U BootCodeSWPartNumber[21] = {"787S005-004"}; #pragma text:text In Compiler Option / Other Options -bmytext:0x1e100.0x1e11d -bfunc_lit:0x1e11e.0x20000 MAP Result of above? Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ lit 1E11E 0035 = 53. bytes (rel,con,rom) Addr Global Symbol ----- -------------------------------- 1E11E __lit_start 1E11E _BootReqID 1E122 _FlashDataID 1E126 _BootAckID 1E12A _HWPNMsgID 1E12E _SWPNMsgID 1E132 _HWSNMsgID 1E136 _BOOT_CHECKSUM_VALUE <-- should be in "mytest @ 0x1e100 1E138 _BOOT_CRC_VALUE <-- should be in "mytest @ 0x1e102 1E13A _BOOT_END_ADDRESS <-- should be in "mytest @ 0x1e104 1E13E _BootCodeSWPartNumber <-- should be in "mytest @ 0x1e108 1E153 __lit_end User Base Address Definitions vector = 0x1e000 func_lit = 0x1e11e <-- This is correct. data = 0x100 eeprom:1.4096 myBootData = 0x300 mytext = 0x1e100 <-- Recognizes mytext area Func_lit start where is should but the compiler just ignores the "mytext" assignment. If I place a "dummy" function in mytext space that is handled correctly but my consts are still not! Source Code: #pragma text:mytext // located @ 0x0E100 const INT16U BOOT_CHECKSUM_VALUE = 0x01234; // located @ 0x0E102 const INT16U BOOT_CRC_VALUE = 0x0ABCD; #define END_EXCLUDE_AREA 0x0E103 // located @ 0x0E104 const INT32U BOOT_END_ADDRESS = 0x0FFFF; // Located @ 0x0E108 const INT8U BootCodeSWPartNumber[21] = {"787S005-004"}; VOID DummyFucntionInMyTextSpace(VOID) { } #pragma text:text In Compiler Option / Other Options -bmytext:0x1e100.0x1e11d -bfunc_lit:0x1e11e.0x20000 MAP Results Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ lit 1E11E 0035 = 53. bytes (rel,con,rom) Addr Global Symbol ----- -------------------------------- 1E11E __lit_start 1E11E _BootReqID 1E122 _FlashDataID 1E126 _BootAckID 1E12A _HWPNMsgID 1E12E _SWPNMsgID 1E132 _HWSNMsgID 1E136 _BOOT_CHECKSUM_VALUE <-- should be in "mytest @ 0x1e100 1E138 _BOOT_CRC_VALUE <-- should be in "mytest @ 0x1e102 1E13A _BOOT_END_ADDRESS <-- should be in "mytest @ 0x1e104 1E13E _BootCodeSWPartNumber <-- should be in "mytest @ 0x1e108 1E153 __lit_end Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ mytext 1E100 0002 = 2. bytes (rel,con,rom) Addr Global Symbol ----- -------------------------------- 1E100 _DummyFucntionInMyTextSpace <-- This is correct 1E102 __mytext_end User Base Address Definitions vector = 0x1e000 func_lit = 0x1e11e <-- This is correct. data = 0x100 eeprom:1.4096 myBootData = 0x300 mytext = 0x1e100 <-- Recognizes mytext area This is driving me nuts, all I want to do is place a few consts at Well Known Locations! Thanks Jeff Jeff Milender Systems Engineer Cargo Systems Goodrich Interiors 2604 Highway 20 North Jamestown, ND 58401 Tel: 701-253-7569 jeff.milender@goodrich.com www.goodrich.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080208/c1d940e2/attachment-0001.html From richard-lists at imagecraft.com Fri Feb 8 12:33:53 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Fri Feb 8 12:49:18 2008 Subject: [Icc-avr] const Placement at ABS mem location in BOOT of AT90CAN128 In-Reply-To: References: Message-ID: <200802082049.m18KnH34011280@dragonsgate2.imagecraft.com> An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080208/0dd38e88/attachment.html From bobgardner at aol.com Fri Feb 8 13:08:56 2008 From: bobgardner at aol.com (bobgardner@aol.com) Date: Fri Feb 8 13:24:14 2008 Subject: [Icc-avr] path to beta? Message-ID: <8CA38ADF37CABEC-4EC-C09@Webmail-mg18.sim.aol.com> For some reason I cant find the email with the path to the 7.16 beta....? somebody repost it? ________________________________________________________________________ More new features than ever. Check out the new AOL Mail ! - http://webmail.aol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080208/e933ea4a/attachment.html From BobGardner at aol.com Sat Feb 9 09:05:16 2008 From: BobGardner at aol.com (BobGardner@aol.com) Date: Sat Feb 9 09:20:26 2008 Subject: [Icc-avr] highlight keywords in editor? Message-ID: Anyone know of a way to make __flash show up in the editor as a highlighted keyword? Does the editor have a list of keywords in it? Any way to add __flash to it? **************Biggest Grammy Award surprises of all time on AOL Music. (http://music.aol.com/grammys/pictures/never-won-a-grammy?NCID=aolcmp003000000025 48) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080209/4f8e584a/attachment.html From webbra.mlist at verizon.net Sat Feb 9 14:53:24 2008 From: webbra.mlist at verizon.net (Rich Webb) Date: Sat Feb 9 15:08:53 2008 Subject: [Icc-avr] highlight keywords in editor? In-Reply-To: <200802092000.m19K08uB025866@dragonsgate2.imagecraft.com> References: <200802092000.m19K08uB025866@dragonsgate2.imagecraft.com> Message-ID: <47AE2EE4.8060001@verizon.net> > Anyone know of a way to make __flash show up in the editor as a highlighted > keyword? Does the editor have a list of keywords in it? Any way to add __flash > to it? If you use vim/gvim, just add it to the syntax file c.vim: syn keyword cStorageClass __flash From Jeff.Milender at Goodrich.com Sat Feb 9 19:36:02 2008 From: Jeff.Milender at Goodrich.com (Milender, Jeff) Date: Sat Feb 9 19:54:03 2008 Subject: [Icc-avr] const Placement at ABS mem location in BOOT ofAT90CAN128 References: <200802082049.m18KnH34011280@dragonsgate2.imagecraft.com> Message-ID: Richard, Thanks I will give that a try when I get back to the office and let you know the results, I am out of the office for a week doing some systems integration. I would love to upgrade but seem to have trouble convincing the powers that be to spend any money on software, I will make another attempt.. Thanks Jeff ________________________________ From: icc-avr-bounces@imagecraft.com on behalf of Richard Man Sent: Fri 2/8/2008 2:33 PM To: Discussion list for ICCAVR and ICCtiny Users. You do NOT need tosubscribe to icc-announce if you are a member of this.; icc-avr@imagecraft.com Subject: Re: [Icc-avr] const Placement at ABS mem location in BOOT ofAT90CAN128 First, did you say you are using 7.00? If so, please do upgrade. Second, "text" is for code. You need #pragma lit:mylit const ... #pragma lit:lit etc. At 06:16 AM 2/8/2008, Milender, Jeff wrote: Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C86A5D.2C4A6333" How do I place "const" at absolute Memory Addresses in Boot? This works for the Application but it refuses to for the Boot. In Source: #pragma text :mytext // located @ 0x0E100 const INT16U BOOT_CHECKSUM_VALUE = 0x01234; // located @ 0x0E102 const INT16U BOOT_CRC_VALUE = 0x0ABCD; #define END_EXCLUDE_AREA 0x0E103 // located @ 0x0E104 const INT32U BOOT_END_ADDRESS = 0x0FFFF; // Located @ 0x0E108 const INT8U BootCodeSWPartNumber[ 21 ] = { "787S005-004" } ; #pragma text :text In Compiler Option / Other Options -bmytext:0x1e100.0x1e11d -bfunc_lit:0x1e11e.0x20000 MAP Result of above? // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 6771 bytes Desc: not available Url : http://dragonsgate.net/pipermail/icc-avr/attachments/20080209/cc99ecf1/attachment.bin From BobGardner at aol.com Sat Feb 9 19:41:04 2008 From: BobGardner at aol.com (BobGardner@aol.com) Date: Sat Feb 9 19:56:11 2008 Subject: [Icc-avr] highlight keywords in editor? Message-ID: Thanks. I meant in the iccavr editor...... In a message dated 2/9/2008 5:54:58 P.M. Eastern Standard Time, webbra.mlist@verizon.net writes: > Anyone know of a way to make __flash show up in the editor as a highlighted > keyword? Does the editor have a list of keywords in it? Any way to add __flash > to it? If you use vim/gvim, just add it to the syntax file c.vim: syn keyword cStorageClass __flash _______________________________________________ Icc-avr mailing list Icc-avr@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-avr **************Biggest Grammy Award surprises of all time on AOL Music. (http://music.aol.com/grammys/pictures/never-won-a-grammy?NCID=aolcmp003000000025 48) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080209/1013d850/attachment.html From richard at imagecraft.com Sun Feb 10 22:38:05 2008 From: richard at imagecraft.com (Richard Man) Date: Sun Feb 10 22:53:39 2008 Subject: [Icc-avr] ICCAVR V7.16 released Message-ID: <200802110653.m1B6rciU044383@dragonsgate2.imagecraft.com> V7.16 - Feb 11th, 2008 IDE - [ADV and PRO only] Added capability to create Library projects. - the AppBuilder generated incorrect register names for the M324P UART0 init function - Added entries for PWM216 and PWM316 Compiler - 7.15 incorrectly gives error on extern __flash ; without initialization. - __flash const ....; was causing an assertion error from the compiler Header File - Added iccioavr.h. You may #include this and it will #include the correct device specific AVR header file based on the device you selected in the IDE. // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] From ali_malihi at yahoo.com Mon Feb 11 08:59:10 2008 From: ali_malihi at yahoo.com (ali malihi) Date: Mon Feb 11 09:14:19 2008 Subject: [Icc-avr] SPI does not work when code imported from Atmega8 to Atmega32 Message-ID: <379815.78497.qm@web51809.mail.re2.yahoo.com> Dear friends, I interfaced AT45DB161 16 Megabit data flash to Atmeag8 using SPI sucessfully. and can read and write without problems. void M8_SPI_init (void) { SetBit(PORTB,PB2); //Set SS high DDRB |= BIT(DDB2) | BIT(DDB3)| BIT(DDB5); //Set SS, MOSI and SCK as outputs ClrBit(DDRB, DDB4); // MISO as input SPCR = BIT(SPE) | BIT(MSTR) | BIT(CPHA) | BIT(CPOL); //Enable SPI in Master mode, mode 3 //SPR1,SPR0=00 means SPI clock rate fcpu/4 8/4=2MHz while(!(Read_DF_status() & 0x80)) WDR(); } but when it is imported to Atmega32, considering SPI pin differance and istead of , it does not work. here is new initialization routine: void M32_SPI_init (void) { SetBit(PORTB,PB4); //Set SS high DDRB |= BIT(DDB4) | BIT(DDB5)| BIT(DDB7); //Set SS, MOSI and SCK as outputs ClrBit(DDRB, DDB6); // MISO as input SPCR = BIT(SPE) | BIT(MSTR) | BIT(CPHA) | BIT(CPOL); //Enable SPI in Master mode, mode 3 //SPR1,SPR0=00 means SPI clock rate fcpu/4 8/4=2MHz while(!(Read_DF_status() & 0x80)) WDR(); } Is there something different between Atmega8 and Atmega32 SPI? your comments are welcome. I use ICCAVR 6.30B. SS pin is used for data flash chip select(CS). Ali Malihi --------------------------------- Never miss a thing. Make Yahoo your homepage. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080211/d16daf1d/attachment.html From benra at imt.liu.se Mon Feb 11 23:33:29 2008 From: benra at imt.liu.se (Bengt Ragnemalm) Date: Mon Feb 11 23:47:39 2008 Subject: SV: [Icc-avr] SPI does not work when code imported from Atmega8 toAtmega32 In-Reply-To: <379815.78497.qm@web51809.mail.re2.yahoo.com> References: <379815.78497.qm@web51809.mail.re2.yahoo.com> Message-ID: <000601c86d49$90b17bd0$b160ec82@Shagrat> Hi. I do not think there are any difference in the way you are using the SPI. You have set the correct pins to output, SPCR is the same and so on. I think you should look into other reasons like SPI double speed setting or AVR clock speed. Are you using the same type of data flash chip? Also check that you are not touching any unused register bits in the mega8 code that may have a purpose in mega32. I can see that you are using the Watchdog and that module have changed. See WDTCR. /Bengt _____ Fr?n: icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] F?r ali malihi Skickat: den 11 februari 2008 17:59 Till: icc-avr@imagecraft.com ?mne: [Icc-avr] SPI does not work when code imported from Atmega8 toAtmega32 Dear friends, I interfaced AT45DB161 16 Megabit data flash to Atmeag8 using SPI sucessfully. and can read and write without problems. void M8_SPI_init (void) { SetBit(PORTB,PB2); //Set SS high DDRB |= BIT(DDB2) | BIT(DDB3)| BIT(DDB5); //Set SS, MOSI and SCK as outputs ClrBit(DDRB, DDB4); // MISO as input SPCR = BIT(SPE) | BIT(MSTR) | BIT(CPHA) | BIT(CPOL); //Enable SPI in Master mode, mode 3 //SPR1,SPR0=00 means SPI clock rate fcpu/4 8/4=2MHz while(!(Read_DF_status() & 0x80)) WDR(); } but when it is imported to Atmega32, considering SPI pin differance and istead of , it does not work. here is new initialization routine: void M32_SPI_init (void) { SetBit(PORTB,PB4); //Set SS high DDRB |= BIT(DDB4) | BIT(DDB5)| BIT(DDB7); //Set SS, MOSI and SCK as outputs ClrBit(DDRB, DDB6); // MISO as input SPCR = BIT(SPE) | BIT(MSTR) | BIT(CPHA) | BIT(CPOL); //Enable SPI in Master mode, mode 3 //SPR1,SPR0=00 means SPI clock rate fcpu/4 8/4=2MHz while(!(Read_DF_status() & 0x80)) WDR(); } Is there something different between Atmega8 and Atmega32 SPI? your comments are welcome. I use ICCAVR 6.30B. SS pin is used for data flash chip select(CS). Ali Malihi _____ Never miss a thing. Make Yahoo your homepage. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080212/045b9f3a/attachment.html From ira at extrasensory.com Wed Feb 13 15:45:44 2008 From: ira at extrasensory.com (Ira) Date: Wed Feb 13 16:01:27 2008 Subject: [Icc-avr] Data table question Message-ID: <0MKpCa-1JPRIs3xmw-0007Hf@mrelay.perfora.net> I have an old project based on a 8 pin PIC that has a 1200 byte data table I need to update it and add a second copy of that table and it doesn't seem that Microchip makes an 8 pin processor with 8K of flash. Atmel to the rescue! But how do I access that string: can I just do something like this? _flash char data[] = "dlkflsdjflds" where the stuff after the equal is 1200 characters long and then reference it with data[1100] It would just as easy to do it with 5 strings of 256 bytes it that would work better in the world of ICCAVR. On the PIC I just had 80 rows starting with dt followed by 16 numbers which worked peachy but it's less clear how to do that here. And if it matters, the tables are generated by a separate application and need to be #included into the code by the end user. Ira From richard-lists at imagecraft.com Wed Feb 13 16:52:53 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Wed Feb 13 17:08:44 2008 Subject: [Icc-avr] Data table question In-Reply-To: <0MKpCa-1JPRIs3xmw-0007Hf@mrelay.perfora.net> References: <0MKpCa-1JPRIs3xmw-0007Hf@mrelay.perfora.net> Message-ID: <200802140108.m1E18hR4090286@dragonsgate2.imagecraft.com> Either a long __flash character array of 1200 bytes or 5x256 will work. ICCAVR is Standard C so it has a lot less limitation in that sense. At 03:45 PM 2/13/2008, Ira wrote: >I have an old project based on a 8 pin PIC that has a 1200 byte data >table I need to update it and add a second copy of that table and it >doesn't seem that Microchip makes an 8 pin processor with 8K of >flash. Atmel to the rescue! But how do I access that string: > >can I just do something like this? > >_flash char data[] = "dlkflsdjflds" > >where the stuff after the equal is 1200 characters long and then >reference it with > > data[1100] > >It would just as easy to do it with 5 strings of 256 bytes it that >would work better in the world of ICCAVR. > >On the PIC I just had 80 rows starting with dt followed by 16 >numbers which worked peachy but it's less clear how to do that here. > >And if it matters, the tables are generated by a separate >application and need to be #included into the code by the end user. > >Ira > // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) From benra at imt.liu.se Wed Feb 13 22:51:04 2008 From: benra at imt.liu.se (Bengt Ragnemalm) Date: Wed Feb 13 23:06:20 2008 Subject: SV: [Icc-avr] Data table question In-Reply-To: <0MKpCa-1JPRIs3xmw-0007Hf@mrelay.perfora.net> References: <0MKpCa-1JPRIs3xmw-0007Hf@mrelay.perfora.net> Message-ID: <000001c86ed5$f8604fd0$b160ec82@Shagrat> Is it the size or the pin numbers you need? They will not be pin compatible you know? If it is just size, there are packages that are much smaller than a 8 pin DIL even if they have a lot more pins. The MLF package is the smallest and there are both PIC:s and AVR:s with it. Of course I would use an AVR but if it is a PIC project it may be smarter to stay with a PIC and be able to reuse the old code. /Bengt > -----Ursprungligt meddelande----- > Fr?n: icc-avr-bounces@imagecraft.com [mailto:icc-avr- > bounces@imagecraft.com] F?r Ira > Skickat: den 14 februari 2008 00:46 > Till: icc-avr@imagecraft.com > ?mne: [Icc-avr] Data table question > > I have an old project based on a 8 pin PIC that has a 1200 byte data > table I need to update it and add a second copy of that table and it > doesn't seem that Microchip makes an 8 pin processor with 8K of > flash. Atmel to the rescue! But how do I access that string: > > can I just do something like this? > > _flash char data[] = "dlkflsdjflds" > > where the stuff after the equal is 1200 characters long and then > reference it with > > data[1100] > > It would just as easy to do it with 5 strings of 256 bytes it that > would work better in the world of ICCAVR. > > On the PIC I just had 80 rows starting with dt followed by 16 numbers > which worked peachy but it's less clear how to do that here. > > And if it matters, the tables are generated by a separate application > and need to be #included into the code by the end user. > > Ira > > _______________________________________________ > Icc-avr mailing list > Icc-avr@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-avr From ira at extrasensory.com Thu Feb 14 00:50:24 2008 From: ira at extrasensory.com (Ira) Date: Thu Feb 14 01:06:00 2008 Subject: SV: [Icc-avr] Data table question In-Reply-To: <000001c86ed5$f8604fd0$b160ec82@Shagrat> References: <0MKpCa-1JPRIs3xmw-0007Hf@mrelay.perfora.net> <000001c86ed5$f8604fd0$b160ec82@Shagrat> Message-ID: <0MKpCa-1JPZnp2AjR-0007BX@mrelay.perfora.net> At 10:51 PM 2/13/2008, you wrote: >Is it the size or the pin numbers you need? They will not be pin compatible >you know? If it is just size, there are packages that are much smaller than >a 8 pin DIL even if they have a lot more pins. The MLF package is the >smallest and there are both PIC:s and AVR:s with it. Of course I would use >an AVR but if it is a PIC project it may be smarter to stay with a PIC and >be able to reuse the old code. It's 211 lines of PIC assembly, probably 50 or less lines of C, way easier to start over in C if I can figure out how to make the required tables. It takes a new PCB no matter what so changing the pinout is easy. Ira From richard at imagecraft.com Sun Feb 24 21:54:09 2008 From: richard at imagecraft.com (Richard Man) Date: Sun Feb 24 22:09:45 2008 Subject: [Icc-avr] V7.16A BETA0 Message-ID: <200802250609.m1P69hMS074356@mail.imagecraft.com> The AppBuilder now works with all currently supported devices: http://www.imagecraft.com/pub/iccv7avr_v716a_beta0.exe V7.16A IDE - [AppBuilder] Added support for all Mega and Tiny devices on the device list Compiler - Added (R)CALL/RET -> (R)JMP tail call optimization // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] From sl at ecpower.dk Sun Feb 24 23:55:15 2008 From: sl at ecpower.dk (Steven Lose) Date: Mon Feb 25 00:10:13 2008 Subject: SV: [Icc-avr] V7.16A BETA0 References: <200802250609.m1P69hMS074356@mail.imagecraft.com> Message-ID: <072D96786BFC014AAEBA9EB07A8070EA3ADA13@seattle.ecpower.dk> Hi Richard. I updated to 7.16 from 7.14B and my project could not compile, because the options was wrong. Project was set as a library, and to execute a '0' before compile! After changing the options back the project can now compile, but does not work anymore. Seems to be a float problem. Med venlig hilsen / Best regards / mit freundlichen Gr??en EC POWER A/S Steven Lose Software Ingeni?r Tlf.: +45 87434100 Direkte tlf. +45 58286608 Email: sl@ecpower.dk www.ecpower.dk -----Oprindelig meddelelse----- Fra: icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] P? vegne af Richard Man Sendt: 25. februar 2008 06:54 Til: icc-avr@imagecraft.com Emne: [Icc-avr] V7.16A BETA0 The AppBuilder now works with all currently supported devices: http://www.imagecraft.com/pub/iccv7avr_v716a_beta0.exe V7.16A IDE - [AppBuilder] Added support for all Mega and Tiny devices on the device list Compiler - Added (R)CALL/RET -> (R)JMP tail call optimization // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] _______________________________________________ Icc-avr mailing list Icc-avr@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-avr From sl at ecpower.dk Tue Feb 26 03:34:49 2008 From: sl at ecpower.dk (Steven Lose) Date: Tue Feb 26 03:49:50 2008 Subject: SV: [Icc-avr] V7.16A BETA0 References: <200802250609.m1P69hMS074356@mail.imagecraft.com> <072D96786BFC014AAEBA9EB07A8070EA3ADA13@seattle.ecpower.dk> Message-ID: <072D96786BFC014AAEBA9EB07A8070EA3ADB57@seattle.ecpower.dk> Hi Richard. I still have problems with floats after updating to 7.16A from 7.14B Listed below is something odd, the variables fToPi and fStep does not init to the values? There is not generated any code for those lines?! Some other thing, the variables have a number attached to them, apparently added by the compiler! _LcdCirkel: ucY1 --> R10 ucX1 --> R12 fPosY1 --> Y,+41 fPosX1 --> Y,+37 fYsin1 --> Y,+33 fXcos1 --> Y,+29 fDegree0 --> Y,+25 fRadius0 --> Y,+21 fY0 --> Y,+17 fX0 --> Y,+13 ucGlY0 --> R22 ucGlX0 --> R20 DrawClr --> Y,+55 Radius --> Y,+53 Y --> R10 X --> R12 A194 940E E160 CALL push_xgsetF03C A196 2EA2 MOV R10,R18 A197 2EC0 MOV R12,R16 A198 97AD SBIW R28,0x2D (0737) } (0738) (0739) void LcdCirkel(unsigned char X,unsigned char Y,unsigned char Radius,unsigned char DrawClr) (0740) { (0741) float fXcos,fYsin; (0742) float fDegree; (0743) float fRadius; (0744) float fX,fY; (0745) float fPosX,fPosY; (0746) float fToPi = 6.28318530718; (0747) float fStep = 0.01745329252; (0748) unsigned char ucX; (0749) unsigned char ucY; (0750) unsigned char ucGlX = 255; A199 EF4F LDI R20,0xFF (0751) unsigned char ucGlY = 255; Med venlig hilsen / Best regards / mit freundlichen Gr??en EC POWER A/S Steven Lose Software Ingeni?r Tlf.: +45 87434100 Direkte tlf. +45 58286608 Email: sl@ecpower.dk www.ecpower.dk -----Oprindelig meddelelse----- Fra: icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] P? vegne af Steven Lose Sendt: 25. februar 2008 08:55 Til: Discussion list for ICCAVR and ICCtiny Users. You do NOT needtosubscribeto icc-announce if you are a member of this. Emne: SV: [Icc-avr] V7.16A BETA0 Hi Richard. I updated to 7.16 from 7.14B and my project could not compile, because the options was wrong. Project was set as a library, and to execute a '0' before compile! After changing the options back the project can now compile, but does not work anymore. Seems to be a float problem. Med venlig hilsen / Best regards / mit freundlichen Gr??en EC POWER A/S Steven Lose Software Ingeni?r Tlf.: +45 87434100 Direkte tlf. +45 58286608 Email: sl@ecpower.dk www.ecpower.dk -----Oprindelig meddelelse----- Fra: icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] P? vegne af Richard Man Sendt: 25. februar 2008 06:54 Til: icc-avr@imagecraft.com Emne: [Icc-avr] V7.16A BETA0 The AppBuilder now works with all currently supported devices: http://www.imagecraft.com/pub/iccv7avr_v716a_beta0.exe V7.16A IDE - [AppBuilder] Added support for all Mega and Tiny devices on the device list Compiler - Added (R)CALL/RET -> (R)JMP tail call optimization // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] _______________________________________________ Icc-avr mailing list Icc-avr@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-avr _______________________________________________ Icc-avr mailing list Icc-avr@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-avr From richard at imagecraft.com Tue Feb 26 03:47:09 2008 From: richard at imagecraft.com (Richard Man) Date: Tue Feb 26 04:02:50 2008 Subject: [Icc-avr] V7.16A BETA1 Message-ID: <200802261202.m1QC2nAN041900@mail.imagecraft.com> BETA1 fixes two problems: - the (new) .cpu files now use symbolic names for the interrupt vectors - Some old project files were opened as "Library Project" http://www.imagecraft.com/pub/iccv7avr_v716a_beta1.exe V7.16A IDE - [AppBuilder] Added support for all Mega and Tiny devices on the device list Compiler - Added (R)CALL/RET -> (R)JMP tail call optimization // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] From richard-lists at imagecraft.com Tue Feb 26 03:52:07 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Tue Feb 26 04:07:48 2008 Subject: SV: [Icc-avr] V7.16A BETA0 In-Reply-To: <072D96786BFC014AAEBA9EB07A8070EA3ADB57@seattle.ecpower.dk> References: <200802250609.m1P69hMS074356@mail.imagecraft.com> <072D96786BFC014AAEBA9EB07A8070EA3ADA13@seattle.ecpower.dk> <072D96786BFC014AAEBA9EB07A8070EA3ADB57@seattle.ecpower.dk> Message-ID: <200802261207.m1QC7l7X042121@mail.imagecraft.com> The "number" issue indicates that you are using the MIO global optimizer which has not changed for a while. Actually, the devteam is feverishly working on MIO V2, hopefully we will have good news soon - anyway, please email me offlist with compilable example and I will take a look. Thanks. At 03:34 AM 2/26/2008, Steven Lose wrote: >Hi Richard. > >I still have problems with floats after updating to 7.16A from 7.14B > >Listed below is something odd, the variables fToPi and fStep does >not init to the values? >There is not generated any code for those lines?! > >Some other thing, the variables have a number attached to them, >apparently added by the compiler! > > > >_LcdCirkel: > ucY1 --> R10 > ucX1 --> R12 > fPosY1 --> Y,+41 > fPosX1 --> Y,+37 > fYsin1 --> Y,+33 > fXcos1 --> Y,+29 > fDegree0 --> Y,+25 > fRadius0 --> Y,+21 > fY0 --> Y,+17 > fX0 --> Y,+13 > ucGlY0 --> R22 > ucGlX0 --> R20 > DrawClr --> Y,+55 > Radius --> Y,+53 > Y --> R10 > X --> R12 > A194 940E E160 CALL push_xgsetF03C > A196 2EA2 MOV R10,R18 > A197 2EC0 MOV R12,R16 > A198 97AD SBIW R28,0x2D >(0737) } >(0738) >(0739) void LcdCirkel(unsigned char X,unsigned char Y,unsigned char >Radius,unsigned char DrawClr) >(0740) { >(0741) float fXcos,fYsin; >(0742) float fDegree; >(0743) float fRadius; >(0744) float fX,fY; >(0745) float fPosX,fPosY; >(0746) float fToPi = 6.28318530718; >(0747) float fStep = 0.01745329252; >(0748) unsigned char ucX; >(0749) unsigned char ucY; >(0750) unsigned char ucGlX = 255; > A199 EF4F LDI R20,0xFF >(0751) unsigned char ucGlY = 255; > // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) From j_baraclough at zetnet.co.uk Fri Feb 29 16:42:42 2008 From: j_baraclough at zetnet.co.uk (John Baraclough) Date: Fri Feb 29 16:57:47 2008 Subject: [Icc-avr] Xmega finally arrives In-Reply-To: <200802261207.m1QC7l7X042121@mail.imagecraft.com> References: <200802250609.m1P69hMS074356@mail.imagecraft.com> <072D96786BFC014AAEBA9EB07A8070EA3ADA13@seattle.ecpower.dk> <072D96786BFC014AAEBA9EB07A8070EA3ADB57@seattle.ecpower.dk> <200802261207.m1QC7l7X042121@mail.imagecraft.com> Message-ID: <47C8A682.1090704@zetnet.co.uk> http://www.atmel.com/dyn/products/product_card.asp?PN=ATxmega128A1 John From richard-lists at imagecraft.com Fri Feb 29 17:11:17 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Fri Feb 29 17:27:10 2008 Subject: [Icc-avr] Xmega finally arrives In-Reply-To: <47C8A682.1090704@zetnet.co.uk> References: <200802250609.m1P69hMS074356@mail.imagecraft.com> <072D96786BFC014AAEBA9EB07A8070EA3ADA13@seattle.ecpower.dk> <072D96786BFC014AAEBA9EB07A8070EA3ADB57@seattle.ecpower.dk> <200802261207.m1QC7l7X042121@mail.imagecraft.com> <47C8A682.1090704@zetnet.co.uk> Message-ID: <200803010127.m211R9VT031501@mail.imagecraft.com> We should have the basic support: compiler, header files, device selection list in by the end of March, hopefully earlier. AppBuilder work has also started, but that would take a little while. At 04:42 PM 2/29/2008, John Baraclough wrote: >http://www.atmel.com/dyn/products/product_card.asp?PN=ATxmega128A1 > >John // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com)