Activity for cribcat

  • cribcat cribcat posted a comment on discussion Open Discussion

    I found this... do you have to specify the second set of pins by enabling Dual Control... looks like it. Simple enough to try. I've only read this about seven times. Let's see...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Working on slave ATM, can't seem to get it to respond to it's address... so i'm not sure what is needed. Focusing in on getting it to respond at this point. With most of the 'C' code I find, it does a couple of bus and error checks(collision , buserr) and then checks the APIF(address|stop). Guess I need to concentrate on that Slave code with the APIF detect. APIF can be either stop condition or address match which is determined by the AP bit in SSTATUS. For me the problems usually avalanche and fall...

  • cribcat cribcat posted a comment on discussion Open Discussion

    I rarely use MPLABX for anything anymore. Sooner or later MPLABX will be all we have. I'll see if I can make heads or tails of it. My assembly is NOT the way to go for Hardware i2C ... I have no idea what I'm doing or what a typical slave/master relationship looks like this early in my attempts. I have not attempted to do any bus error checking or timeout loops yet. The only thing I can do reliably is set an address and read my 24LC256 EEPROM with polling only. I have a lot of time invested in I2C...

  • cribcat cribcat posted a comment on discussion Open Discussion

    As far as the formula for TWI... ??? I can't guarantee it's validity. There is a calculation for T_Rise and I think it is assumed to be Zero in this formula. There are latency bits to be set in CTRLA... i think? I'm not having a lot of success getting the slave mode working. 400 KHz may need smaller values in the resistors... I'm using 10K right now, but only up to 200 KHz. I'm glad you're having some luck!

  • cribcat cribcat posted a comment on discussion Open Discussion

    New TWI read code

  • cribcat cribcat posted a comment on discussion Open Discussion

    Sometimes the data sheet works against you...

  • cribcat cribcat posted a comment on discussion Open Discussion

    There is excess code that needs to be trimmed in the " rdone_check: " loop. The program was malfunctioning on my tn1616. I will send updated code later after I verify that the new code works(better)on the m4809. After that, on to the Slave...

  • cribcat cribcat posted a comment on discussion Open Discussion

    This code sets(writes) an address of 32 in the 24LC64, reads the 32 bytes starting @ address 32, prints to USART3 , Waits 2 sec, Repeat. All done by polling the TWI flags.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Yes, I will post the ROUGH Master code for the MEGA4809... let me get it together.

  • cribcat cribcat posted a comment on discussion Open Discussion

    At the current moment I can point at a certain address and read 32 bytes(less or more) through polling the interrupt flags with my 24LC64 EEPROM. Currently I have turned my TINY1616 into the Master and working on code for M4809 Slave R/W. Error checking will be the last thing implemented. Many facets to the protocol and I'm not strong on it. There seems to be many possible ways to set up interrupts. I have no other I2C devices to test with so I'm working closely with the Data Sheets and legacy I2C...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Looks Good, Excellent work !... That's Good News. I am not overly familiar with I2C Hardware . What does that entail? I've written a BIT BANG I2C for M328P chips but neve have done hardware. Don't have a good idea of what that looks like. I wrote an INTERRUPT ONLY driven twi driver last January and it's the only thing I can get to work with my 24LC64 eeprom device. It will write 32 bytes and then read them back . I can't seem to get hardware going with user software polling interaction. Must be something...

  • cribcat cribcat posted a comment on discussion Open Discussion

    A little extra information I found... This is from CURTVM on the AVRFREAKS forum and deals with writing flash: https://www.avrfreaks.net/s/topic/a5C3l0000003jtrEAA/t390218 "The datasheet is confusing for BOOTEDN/APPEND, but if you read one of their app notes- When BOOTEND is zero, the entire Flash is considered to be boot section, the value in APPEND is ignored, and it is not possible to write to Flash. When BOOTEND is non-zero, the default location of the interrupt vector table pointer will be written...

  • cribcat cribcat posted a comment on discussion Open Discussion

    In the "C" language (AVR-GCC) they put a structure that sets the fuses and lets the compiler know where everything is. AVR-GCC also goes by a linker file and has a little more flexibility as well as Complexity. E.G. #include <avr/io.h> FUSES = { .WDTCFG = 0x00, // WDTCFG {PERIOD=OFF, WINDOW=OFF} .BODCFG = 0x00, // BODCFG {SLEEP=DIS, ACTIVE=DIS, SAMPFREQ=1KHZ, LVL=BODLEVEL0} .OSCCFG = 0x02, // OSCCFG {FREQSEL=20MHZ, OSCLOCK=CLEAR} .TCD0CFG = 0x00, // TCD0CFG {CMPA=CLEAR, CMPB=CLEAR, CMPC=CLEAR, CMPD=CLEAR,...

  • cribcat cribcat posted a comment on discussion Open Discussion

    The cause of the interrupts not firing is likely because of changing the fuse settings. It is unavoidable with these chips. You have to move the Interrupt JUMP table OR change the IVSEL to the BOOT Section. I will send two examples of how to fix. As far as my understanding of fuses, I have many days/weeks tied up in trying to understand them. I think I have a handle on it but...Who Knows? As far as the .DAT file: This is what prompted me to ask how far are we taking the functionality. We have the...

  • cribcat cribcat posted a comment on discussion Open Discussion

    @Anobium: compiled some code fragments that You provided: Sram variables are 1 byte in size and word(2 bytes)need to be reserved for some of these unless the compiler is only using LOW byte IDK?? Possibly because we are not going over 256 bytes for a page write?. .EQU ADDRESS=10240 ; 0x2800 .EQU CCOUNT=10241 ; 0x2801 .EQU CHIPMAPPED_PROGMEM_START=10242 ; 0x2802 .EQU CHIPPROGMEM_PAGE_SIZE=10243 ; 0x2803 .EQU DDATA=10244 ; 0x2804 .EQU XMEMDATA=10245 ; 0x2805 .EQU XMEMDATA_H=10246 ; 0x2806 seems like...

  • cribcat cribcat posted a comment on discussion Open Discussion

    @Anobium: compiled some code fragments that You provided: Sram variables are 1 byte in size and word(2 bytes)need to be reserved for some of these unless the compiler is only using LOW byte IDK?? Possibly because we are not going over 256 bytes for a page write?. .EQU ADDRESS=10240 ; 0x2800 .EQU CCOUNT=10241 ; 0x2801 .EQU CHIPMAPPED_PROGMEM_START=10242 ; 0x2802 .EQU CHIPPROGMEM_PAGE_SIZE=10243 ; 0x2803 .EQU DDATA=10244 ; 0x2804 .EQU XMEMDATA=10245 ; 0x2805 .EQU XMEMDATA_H=10246 ; 0x2806 seems like...

  • cribcat cribcat posted a comment on discussion Open Discussion

    This is the same program as above . It reads the flash before Flash Write, Prints to USART, puts it in ram, modifies a byte in ram, writes to Flash, reads the modified re- written flash and sends to USART. This works on the 0X1288 BOOTEND 8 : 0X1287 APPEND 16 Fuse settings

  • cribcat cribcat posted a comment on discussion Open Discussion

    I will attach another Flash Write program. With my setup, it seems to work... I change the Test Byte from 0xaa to 0xbb to 0xcc and it fills the Flash Memory. Reads DATA using LPM or LD. The Timer interrupt blink works. Getting consistent flash writes. I assume You're using the nano... is there any issues with the debugger or a bootloader? ... Shouldn't be. Sounds like you are doing what is needed to get byte granularity... which is not easy. The Write Flash process is tricky. As long as the BOOTEND...

  • cribcat cribcat posted a comment on discussion Open Discussion

    I will re-check my code and get back to you. I took me many days to figure it out. I've made many mistakes. The code could be wrong. if your intent is to write the to page buffer(in the code above) there is no need to use the byte address by shifting left and effectively doubling it. We are addressing this as if it were ram even though it is flash when writing a page to this "imaginary" page buffer... (but I don't know if that is what you are trying to do).

  • cribcat cribcat posted a comment on discussion Open Discussion

    Not sure in what context I'm dealing with in the .DAT files. There are interrupts with Multiple sources using a single vector as well as configuration group bits... not sure what to do there. Anyway, pls check this and see if any of it is useable.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Ok, I will switch gears and work on the [interrupt] section of the DAT file. Currently trying to figure out TWI / i2c protocol for the m4809. I imagined that the compiler side would be difficult. I don't envy your job... it's a big one! From what I understand the AVR-0/1 processors have similar syntax as the X-mega chips so that may help us in the future. As far as what's missing?... These new processors are feature rich. Now that some of the big chunks are out of the way, we will have to re-assess...

  • cribcat cribcat posted a comment on discussion Open Discussion

    That's awesome, Keep up the good work!

  • cribcat cribcat posted a comment on discussion Open Discussion

    Don't think you need this demo code, but here it is just in case.

  • cribcat cribcat posted a comment on discussion Open Discussion

    You Have to write 0xFF to USERROW to erase it, you can erase the entire page of 64 bytes, or a byte at a time... the code is attached above as MEGA4809_USER_ROW_EEP_RW.asm along with the flash page write code.

  • cribcat cribcat posted a comment on discussion Open Discussion

    I think the EPWRITE will work fine with the 0x1300 offset in USERROW... That's essentially what the routine is, But it doesn't have an erase routine specific to it( Like EEER, EEPROM Erase) and it is persistent through Chip_Erase. Maybe I'll try the EEER EEPROM Erase on USERROW.

  • cribcat cribcat posted a comment on discussion Open Discussion

    The code controlling the main prescaler/OSC select was changing the division values intermittently. it may or may not have caused you some problems. Here's a new Routine.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Still have to figure out an erase routine for USERROW ... probably just writing 0xFF. The Flash Write needs the BOOTEND/ APPEND fuses specifically set. A default BOOTEND 0 : APPEND 0, turns the entire Flash into the BOOT section and no section can write to itself.

  • cribcat cribcat posted a comment on discussion Open Discussion

    The TCB can only do a main clock of div 2, It is not like TCA. If You divide the Main Clock(OSC20M) by 64 then You can get the TCB PWM down to about 612 Hz, but then it may affect Millis() on TCA . TCA is the champion in the 4809 as far as PWM. TCB is a good interval counter. I'm having anomalous issues with MICROCHIP( AKA.ATMEL) STUDIO 7 simulator. I have no debugger so I have to debug with USART and LEDs to verify that hardware works. Rumor has it that Microchip is not doing any bug fixes on microchip/atmel...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Millis () seems to run fine on my hardware. Have a good weekend, I'd have to say you've earned it.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Re: millis() indeed great news! I think the TINY USART/TIMERs ...etc, are the same as the MEGA peripherals except for the number of USART/TIMERs. The Tinys have TCD and a DAC too. The setup and operation are nearly the same. Pretty much all of the code will be universal in AVR-0/1. Anyway... i hope that's the case. I noticed AVRDUDE 8 has been released. It seems to communicate with my USB to Serial converter which will make life easier for those with raw chips and a serial device. AVRDUDE 7 probably...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Speaking of timers, for the millis () function, There are four TCB type and one TCA type. The TCA timer would seem Ideal for millis() but you are left with TCB timers which have unity or /2 prescale capability. You can run TCB from TCA's prescaled input clock but they are then locked. ULP_OSC? Maybe I've put the cart before the horse ... anyway it's on my mind.

  • cribcat cribcat posted a comment on discussion Open Discussion

    USERROW should read the same as the EEProm(according to the data sheet). It's address starts@ 0x1300 and ends 0x133F while EE is 0x1400 to 0x14FF. In fact, I think all the AVR-0/1 processors have Unified Memory ... so you can read flash with an LD instruction. LD R18, X+ just remember that " dataMapped_PROGMEM" starts @ 0x4000 on the M4809.

  • cribcat cribcat posted a comment on discussion Open Discussion

    We also have USERROW which gives us another 64 bytes of EEPROM. Evidently it operates like EE and you can write a single byte at a time while CPU running. Working on Flash write Progmem at the moment.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Compiled " 50_MEGA4809_RTC_Interrupt .gcb " and it ran successfully on my Hardware.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Code to Write a page at once. Read delay is 500ms...Slow.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here is the code to write internal 256 byte EEPROM . USART set to 57600

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here is the code to read internal 256 byte EEPROM

  • cribcat cribcat posted a comment on discussion Open Discussion

    Compiled and loaded hex from "40_MEGA4809_USART_RXTX .gcb" in the 'Demos' directory that you sent with the Build 1416 package . it says "Started: Serial between two devices" and echoes back any character typed . Looks Good... Congratulations! will look at RTC.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Evan, Looks like you've been extremely busy! I think the Progmem "data" is possible on the avr-0/1 series chips using the NVM controller. If my memory serves me, in the older MCUs like the m328P, only the bootloader can do the SPM(Store Program Memory)in a routine. You have to define and set the bootloader section with fuses, then write from that section. In the avr-0/1 series, BOOT section can write to APP section and the APP section can write to the APPDATA section. --BUT--- there are 2 fuses that...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Regarding 40_MEGA4809_USART_RXTX .gcb gave me a warning message(see attachment) when I compiled and did NOT return characters when typed. It did display the message "Started: Serial between two devices" on Realterm.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here's my thoughts on Memory DATA. it got a little long so see the attached text.

  • cribcat cribcat posted a comment on discussion Open Discussion

    And here is a sleep demo. It's not on the work list, you may have already done it.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here is the updated " MEGA4809_32K_OSC_TCB_PWM (updated).asm "

  • cribcat cribcat posted a comment on discussion Open Discussion

    Evan, What is this code supposed to do? I'm curious: "Memory DATA: This is ability to add DATA blocks to ASM. Currently NO AVR is supported!" I have a GitHub account but I can not edit/add documents on your GitHub. I have attached a little blurb for the delay loop webpage I mentioned yesterday. I don't publish on GitHub... so I'm ignorant of how it works. I will re post the " MEGA4809_32K_OSC_TCB_PWM.asm " updated code.

  • cribcat cribcat posted a comment on discussion Open Discussion

    MEGA4809_32K_OSC_TCB_PWM.asm Line 36 "|CLKCTRL_CLKOUT_bm" needs to be edited out . the line should be ldi tmp, CLKCTRL_CLKSEL_OSCULP32K_gc CLK OUT could pop something on your chip or damage whatever is connected to it if hooked up directly.(worst case scenario)

  • cribcat cribcat posted a comment on discussion Open Discussion

    I used Bret Mulvey 's delay loop calculatorfor my delays in my code. we should probably replace the delay loops with GCbasic assembled ones or give Bret credit? the website is now :http://darcy.rsgc.on.ca/ACES/TEI4M/AVRdelay.html I can do that if need be .

  • cribcat cribcat posted a comment on discussion Open Discussion

    @evanvennn : That list will do fine. Thank You. As far as what you already have... I've made a directory to put copies of all sent items , we can cross check if necessary. I see you have put them on github... good. The problem with moving the Vectors on my chip seems to have been solved by writing the correct fuse byte to BOOTEND. You can delete or comment out the move_vectors routine . move_vectors: ; TO BootSection ldi tmp2,CPU_CCP_IOREG_gc ; CCP Change Protection ldi tmp, CPUINT_IVSEL_bm ; vector...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Thanks Angel, step by step we will get there. Here is an example of a pin interrupt.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here's some pin operations to set and clear the pullup resistors and setting/clearing a pin with OUTSET/OUTCLR.

  • cribcat cribcat posted a comment on discussion Open Discussion

    The compiler successfully updated. Anything pressing that you need worked on? or shall I just press on?. Trying to work the most used peripherals first. You have Timer Counter A and B in PWM, Timer Counter B as a periodic interrupt. Is there anything with USART serial we need to address? I'll continue, Let me know if I need to switch gears.

  • cribcat cribcat posted a comment on discussion Open Discussion

    O.K. think I have it. The 0x1288 BOOTEND FUSE was set to 2 and I have no bootloader... anyway I changed your Loopback demo from USART3 to USART1 , set it to 57.6K, compiled it and ran it on the 4809. it seems to echo exactly what is typed after the (Splash Screen) message. It's good to see results ! Also thanks for the Honorable mention on your video.

  • cribcat cribcat posted a comment on discussion Open Discussion

    That's a good suggestion, I have cut and pasted the Vector list from one of your demo's assembly listings a few days ago with no positive results. .ORG 0 rjmp BASPROGRAMSTART ;Reset .ORG 2 reti ;CRCSCAN_NMI .ORG 4 reti ;BOD_VLM .ORG 6 ... etc. I will try it again. Since I started working on AVR-0/1 chips, I have spent days on this issue... which may not even be an issue except for my understanding of the basic MCU function. I might have to put in a ticket with Microchip. It wouldn't hurt to test...

  • cribcat cribcat posted a comment on discussion Open Discussion

    When you initially set the fuses, there are bytes to set up the APPEND, BOOTEND which control the size of your main code section, your bootloader section, and your APPDATA section. I think I've gotten the sizes wrong in the fuses, so my MCU will not trigger any interrupts unless I put in the following code: move_vectors: ; TO BootSection ldi tmp2,CPU_CCP_IOREG_gc ; CCP Change Protection ldi tmp, CPUINT_IVSEL_bm ; vector select 1 == in boot section out CPU_CCP, tmp2 ; Change Protection sts CPUINT_CTRLA,...

  • cribcat cribcat modified a comment on discussion Open Discussion

    Here is Timer Counter A Splitmode PWM. Splits the 16bit timer to function as two 8 bit PWMs.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here is Timer Counter A Splitmode PWM. Splits the 16bit timer to function as two 8 bit PWMs.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here is Timer Counter A Splitmode PWM. Splits the 16bit timer to function as two 8 bit PWMs.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Ok, updated TCA 20MHz PWM.

  • cribcat cribcat posted a comment on discussion Open Discussion

    I think you may need to comment out the move vectors code to run on your boards... my fuses are wrong so I need that code.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Thrilled to see the progress! Anobium: --It would be good to get PWM using OSC internal frequency at 20mHz I will write it for the PWM only, but if you need it now, the Timer Counter A 16Bit PWM @ 20 MHz should be in the [MEGA4809_ADC__INTERRUPT] Demo. The ADC interrupt feeds the PWM . G

  • cribcat cribcat posted a comment on discussion Open Discussion

    Here is the PWM with TCB in 32K internal OSC ULP.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Yes, I have the 32 bit version: 2024.08.15 (Windows 32 bit) : Build 1409 My computer is 64 bit but the 32 bit version is what the link on the Sourceforge download gave me. running windows 11 ... if that matters.

  • cribcat cribcat posted a comment on discussion Open Discussion

    I think my version is the 32bit GCBASIC compiler. This was on the about tab: OS: Windows_NT ia32 10.0.22631 ... does that help?

  • cribcat cribcat posted a comment on discussion Open Discussion

    Evan, You can take down the video... thanks for the info. Have the main RX,TX interrupts attached. Let me know if i missed something thanks Greg

  • cribcat cribcat posted a comment on discussion Open Discussion

    will do... USART Interrupts. Here is TCB PWM 8bit My oscilloscope is out of calibration, so I can not check frequency but clearly it does PWM.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Hmmm... sorry, I will try to get code on the page before I send next time. Resending MEGA4809_USART_RX_TX _ECHO.asm. Got the video, Thanks it is good to have some context for my own understanding. A lot of information, Need to wrap my head around it. Was thinking about doing receive and transmit interrupts... What is priority for you? some of what we're doing will be new ground for me so please bear with me.

  • cribcat cribcat posted a comment on discussion Open Discussion

    I have not dealt with double speed before. I will look into it a bit. Were you having issues with USART speed , or just wanting to implement it? The next example is the ADC interrupt which feeds the ADC to the PWM.

  • cribcat cribcat posted a comment on discussion Open Discussion

    PG 287 on my 4809 data sheet says: 23.3.3.2.4 Double-Speed Operation Double-speed operation allows for higher baud rates under asynchronous operation with lower peripheral clock frequencies. This operation mode is enabled by writing the RXMODE bits in the Control B (USARTn.CTRLB) register to 0x01 Here's a Free Running ADC example, with TCA PWM and TCB periodic interrupt. You will probably have to comment out the [move_vectors] code Greg

  • cribcat cribcat posted a comment on discussion Open Discussion

    Anobium said :" I think ( please verify ) that we have to ignore the datasheet. As there is NO method to make AVRASM2 compile." Atmel data sheets are notoriously less than great for errors and omissions. I think Microchip just cut and pasted Atmel's data sheet text into their own data sheets. I always go by the (m4809def.inc) Definitions file and cryptic error messages that the assembler/compiler gives. Data sheet is good for explaining(most of the time) what the bits do. Error messages can be looked...

  • cribcat cribcat posted a comment on discussion Open Discussion

    I'm way behind here, still trying to figure out how to do ZOOM calls. Microphone doesn't work because... well... "It's a Dell". Anobium Said:"the DAT file in GCBASIC has historically ( before today ) has the register and register bits defined .... not register bit masks" From "m4809def.inc" ; ADC_CTRLC masks .equ ADC_PRESC_gm = 0x07 ; Clock Pre-scaler group mask .equ ADC_PRESC_gp = 0 ; Clock Pre-scaler group position .equ ADC_PRESC_0_bm = (1<<0) ; Clock Pre-scaler bit 0 mask .equ ADC_PRESC_0_bp =...

  • cribcat cribcat posted a comment on discussion Open Discussion

    I should have left the receive stuff in. It is best used with a buffer(IMO) but I do not have working code for a buffer in this example yet. I think GCBasic has working buffers. I am very pleased this could be of some use to someone in .ASM form. There is a ton of code in C but not nearly as much in assembler.

  • cribcat cribcat posted a comment on discussion Open Discussion

    Perfect, I have attached the asm code for the routine outlined above. It works on Realterm and Putty over a USB serial device (CP2104 ). I have taken out the byte retrieval receive portion. Baud rate is set for 9600 ...easily changed. Hope it's adequate.

  • cribcat cribcat posted a comment on discussion Open Discussion

    The project is huge! I need to learn how to crawl before walking in this environment. Where is the broom?... I can probably "sweep the floors and empty the trash". Where do I start? I read something about scripts in GCBASIC Maintenance and Development in the GCBASIC documentation. I am also reading various posts in the forum area and familiarizing myself with GCBASIC commands/syntax. As far as USART(rs232) for the 4809, I have working code in assembler to reference. From what you said, USART1 is...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Hello Angel, Hello Anobium, "@Cribcat / @PerPlexd ( you are the same person ? :-) )" indeed, I am the same person may change that back to avoid confusion. Updated and configured compiler after I watched Angel's YouTube vids. Was viewing the gc.bas code earlier. Very interesting. I must say, the development environment is impressive... Your team has done a great job since I last looked at GCBasic! I am familiar with Atmel Studio 4.19 and the newer Atmel Studio/Microchip Studio 7 and a tiny bit with...

  • cribcat cribcat posted a comment on discussion Open Discussion

    Glad to see support for the newer AVR chips, I would like to help out if possible. I program mainly in ASM so i am familiar with the new avr-0 and avr-1 asm syntax, BUT: I keep getting an Error: No chip data file found for MEGA4809. Do the xxxxxxxx.DAT files need to be created or do you have a separate download? Version 1.76.2 Release 23074

  • cribcat cribcat posted a comment on discussion Ask for Help

    I have no idea if this is the right place for this info: after looking at the source code it has come to my attention that no stack is set up in any of the avr bootloader firmware that I can see. From my understanding, on a call, the return address is pushed onto the stack and then popped off automatically with the ret command. So something like this is needed at the start of the program as the first action after .org first_address+4. If you purposely omitted this then Please disregard this message...

  • cribcat cribcat posted a comment on discussion Ask for Help

    Thanks for the reply Dan, The device is an AtMega328. It indeed does work on this device. I will probably use this on my tinys more than annything else. My issue was the !!!!! Set Fuse Bit CKDIV8=1 and 8MHz Calibration value !!!!! statement. So instead of CKDIV8 being unchecked in ponyProg2000, I checked the box so everything was div8. 1 == NOT SELECTED with avr fusebits. The point being is that you DO NOT want the CKDIV8 selected. I'm happy to say that the bootloader is small and I uploaded a blink...

  • cribcat cribcat posted a comment on discussion Ask for Help

    Has anyone ever got the AVR side of this bootloader to work? I built the max 232 hardware and it works with serial comunications. The bootloader compiles, installs and locates itself in flash fine. The PC side of the software detects nothing even with RTS, DTR switched around. Am I using the wrong ports PORTD pins 0,1? RS232. Fusebits are set to 8MHz internal Osc. and clkdiv8 like the bootloader comments say... Any help would be great, Ironically I'll probably have it working soon.

1
MongoDB Logo MongoDB