Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by sdujolo

  1. I tried to compile bootloader from embeddedadventures but I get error. Building... BoostLink Optimizing Linker Version 6.86 http://www.sourceboost.com Copyright© 2004-2008 Pavel Baranov Copyright© 2004-2008 David Hobday C:\Program\SourceBoost\boostlink.pic.exe /ld C:\Program\SourceBoost\lib libc.pic18.lib BoostBloader.obj /t PIC18F4620 /d D:\Downloads\picpack_1_1_0\boostbloader\18f4620 /p boostbloader_18f4620 Exit code was -1073741819. Removing target: boostbloader_18f4620.hex Failed to locate output file 'D:\Downloads\picpack_1_1_0\boostbloader\18f4620\boostbloader_18f4620.hex' Done Failed
  2. Hi Jorgen, It's all updated now. The screamer chip selection is unimportant - the BoostBloader knows how to adjust things itself, so you don't have to get it right every time you select a new chip. The only thing that matters is the clock speed - but I might let the BoostBloader know about that too, meaning you just choose your serial port and away you go. Which chip are you trying it with? The updated library (version 1.1) with extra bonus documentation is available at embeddedadventures.blogspot.com All feedback very welcome. regards Ian. Hello Ian, And thansk for the new files. I am trying whit PIC18F4620. Best regards /Jörgen
  3. Thanks for your feedback! I've updated the boostbloader to work with 6.85. I'll put an updated archive up later today (1.01). Let me know how you go with that one. kind regards Ian. Hello Ian, I still have not seen any new uploads. And I took a quick look at the Screamer program for uploading new firmware you can only select 16Fxxx chips? Best Regards /Jörgen
  4. Hello and thanks for you for sharing:-) I tryed to compile the boot loader but I get error. Building... BoostLink Optimizing Linker Version 6.85 http://www.sourceboost.com Copyright© 2004-2008 Pavel Baranov Copyright© 2004-2008 David Hobday failure Too much code to fit in ROM, overfilled by:6 locations. Consider reducing reserved memory! Memory reserved at bottom of memory:32244 locations. C:\Program\SourceBoost\boostlink.pic.exe /ld C:\Program\SourceBoost\lib libc.pic18.lib BoostBloader.obj /t PIC18F4520 /d D:\Downloads\picpack_1_0_0\boostbloader /p boostbloader_18f4520 -rb 32244 Exit code was -2. Removing target: boostbloader_18f4520.hex Failed to locate output file 'D:\Downloads\picpack_1_0_0\boostbloader\boostbloader_18f4520.hex' Done Failed
  5. Hello, The libary code for one wire library use the nop() instruction. They should rewrite this lib becasue now it´s not working with different clock frequency. A work around is to run goodies if you have pro licens and change the code your self. Or you can download the lib code from lika.be
  6. sdujolo

    Delays On 18f

    Your delay_ms(500) should not work as expected because it only support 1byte so to have 500ms delay you should do like this delay_ms(250); delay_ms(250);
  7. I what to see more libary for example USB, RTC, memorycard access ect and some example the use this libs. I think the few libary function in sorceboost is the biggest disadvantage compare to other compilers. Regards /Jörgen
  8. Use float float32_from_int32( int32 ); Regards Dave Thanka Dave I most be blind I have look in the manual many times and I did not see it. I know I have used it before:-P I will contact my doctor Just a tip should not that function be where the other Conversion Function's is? Regards /Jörgen
  9. I am doing some calculation with float point libarary and have a problem. I found a function to convert a float to integer but if I what to use a integer in a float calulation how to do that?
  10. Have anyone write code/lib to use USB Serial port on PIC18F4550? I mean that a virtual RS232 COM port is created.
  11. Just check the manual and use itoa command.
  12. Hello, I have a project that needs to save alot of config data ect. The eeprom in the pic is not big enough to store all data: I have alot of free flash in the PIC can I use that to store data whit read and write to flash funtions? It will not be alot of writeing and read. Or should I use a external eeprom?
  13. Hello, Is there a history what´s new and what is fixed in this relase? /Jörgen
  14. Take a look here Sparkfun Regards /Jörgen
  15. I have Presto programer http://www.pic-tools.com/ it works good and support PIC, dsPIC, AVR, Atmel 8051, eCOG, serial EEPROM & Flash, JTAG, CPLD, ... /Jörgen
  16. Hi Dave, Is not actual programing that´s a problem is how to strcuture the the diffrent task to use it wiht novo RTOS. I have working beta version whit out novo now. Best regards /Jörgen
  17. Sorry for not comming back with an answer.More knowledge of the application is required. Maybe I'll bash out what I think you need. Is the monitoring of the AD values and alarms time crtical? (I would guess not). Regards Dave I don´t know how critical it is am have not tested how fast it had to be read yet. I like to do something like this... 1 Serial communication to receive commands, settings and sending alarms, status ect... (critical) 2 Reading temp (not critical) 3 Read analog-in and check alarm limits(critical) 4 Check temp values are in correct limits(not critical) 5 Read/Write EEPROM on settings change 6 Data from SPI(critical) Hope it make some sense? Regards /Jörgen
  18. So analog needs to be read and processed at precise times as well ? Regards Dave At the moment I have it in the low interrupt like the code below I use it for checking alarm so it´s kind of importen. Regards /Jörgen CODE if ( test_bit(pir1, ADIF) ) //A/D Converter Interrupt Flag bit { char i; short retval; char temp = 0; static char channel = 0;//Channel to do next. char active_channel; //The channel that has the current analog value. if( channel == 0 ) active_channel = MAX_ANALOG_INPUT-1; else active_channel = channel-1; retval = (short)adresh; retval = retval << 8; retval |= adresl; analog_in[active_channel] = retval; if( (active_channel < nr_of_alarm_input) && alarm_on ) { for( i = 0; i < NR_OF_ALARM_ZONE; i++ ) { if( (test_bit(activated_zones, i)) && (test_bit(alarm_zone_inputs, active_channel)) && ( !(test_bit(alarm_delay_input, active_channel) && alarm_delay_counter) ) ) { if( retval < 50 ) { if( !alarm ) alarm_delay_counter = alarm_delay; alarm_status[active_channel] = 2; //Sabotage alarm alarm_zone = i+1; //Zone that is in alarm //Printf("Sabotage larm channel=%d", active_channel + 1); }else if( (retval < (normal_alarm_level-alarm_threshold)) || (retval > (normal_alarm_level+alarm_threshold)) ) { if( !alarm ) alarm_delay_counter = alarm_delay; alarm_status[active_channel] = 1; //Alarm alarm_zone = i+1; //Zone that is in alarm //Printf("Larm channel=%d", active_channel + 1); } } } } clear_bit(adcon0, CHS0); //Clear channel clear_bit(adcon0, CHS1); clear_bit(adcon0, CHS2); clear_bit(adcon0, CHS3); // Shift the channel value to the appropriate position temp = (channel & 0x07) << 2; // And move it to the appropriate position in adcon0 adcon0 |= temp; //Printf("Channel=%d\r\n", active_channel); //Printf("ADC=%d\r\n", retval); if( channel < (MAX_ANALOG_INPUT-1) ) channel++; else channel = 0; temp = channel; clear_bit( pir1, ADIF ); //Clear A/D Converter Interrupt Flag bit adc_go = 1; //Start analog measure }
  19. The application needs to be split down into that which need hard real time reponse, and that which is more forgiving. Like does the temperature need to be read at precise time intervals, or just regularly? Regards Dave Hi Dave, The temperature is does not need to be precise just regulary it´s more how I should deal with serial comunication and the analog-in that need to be read all the time and check the if there are between right intervals. Regards /Jörgen
  20. Hi, I have a project on a PIC18 I use both low and and normal interrupt. I have a EUSART interrupt, A/D Converter Interrupt, timer0 interrupt to read temperature from ds18s20. I the main loop I check for diffrent status that happen in the interrupt rutins. How to use Novo RTOS how to for example use serial comunication, read analog inputs on intrrupt, read tempature for exapmle every 2sec? Regards /Jörgen
  21. Hello here is a code I use. oo_temp oo_conv2temp( char lsb, char msb, char remain, char nr_count ) { //If value is -0.5 it will show 0.5 the you have to check for data.negative int temp_int; oo_temp data; data.negative = 0; temp_int = lsb >> 1; if ( msb == 0xFF ) { if ( lsb.0 == 1 ) temp_int++; temp_int -= 128; data.negative = 1; } data.temp = temp_int; if ( test_bit(lsb, 0) ) { data.decimal = 50; }else{ data.decimal = 0; } return data; }
  22. Here is a example for a flow control regulator. Regards /Jörgen void DFlowPID(void) { float e; // The controller error float up; // Output signals float awc; // Anti windup compensation float IState; // I state (integrated error) float DState; // D state (last error) short Ticks; // Ticks short ScanRate; // Scan rate ScanRate = XXX; Ticks = 0; // Check if time to run if ((++Ticks % ScanRate) != 0) return; // Get current control parameters DFlowCnt.Kp = Conf.DFlowCntKp; DFlowCnt.Ti = Conf.DFlowCntTi; DFlowCnt.Td = Conf.DFlowCntTd; // Get Time DFlowCnt.Time = CLOCK; // Read PV DFlowCnt.PV = AIn(AIX); // Calculate the error e = DFlowCnt.SP - DFlowCnt.PV; e *= DFlowCnt.Kp; // P-part up = e; up += (e-DState)*DFlowCnt.Td/Conf.DFlowCnth; // D-part up += IState; // I-part // Limit output from controller DFlowCnt.Output = up; if (DFlowCnt.Output > Conf.DFlowCntUMax) DFlowCnt.Output = Conf.DFlowCntUMax; else if (DFlowCnt.Output < Conf.DFlowCntUMin) DFlowCnt.Output = Conf.DFlowCntUMin; if (!DFlowCnt.Active) DFlowCnt.Output = ReadAOut(AOX); awc = up - DFlowCnt.Output; // Update states DState = e; if (DFlowCnt.Ti > 0.01) IState = e * Conf.DFlowCnth / DFlowCnt.Ti + IState - awc; else IState = 0.0; if (DFlowCnt.Active) AOut(AOX, DFlowCnt.Output); return; }
  23. If I like to jump to the bootloader(tinybootloader) from the code how do I do it? Best regards /Jörgen
  24. Hello, I am not sure what you mean? Take a look on the web site Presto. Presto is: PRESTO - fast and flexible USB programmer PRESTO is a powerful, very fast and cost effective programmer for a wide range of popular components - microcontrollers, serial EEPROM and Flash memory chips, CPLDs and others. PRESTO operates on a USB port and requires no external power supply.
  • Create New...