Jump to content

TFcroft4

EstablishedMember
  • Content Count

    36
  • Joined

  • Last visited

Everything posted by TFcroft4

  1. Thanks for the replies. I noted this text in the rs232_driver.h which specifically says software emulation. I am confused Ted //////////////////////////////////////////////////////////////////////////// // Serial Communications Library //////////////////////////////////////////////////////////////////////////// // Author(s): Andrew Smallridge // Date 15 November 2004 // // Copyright© 2004-2006 Andrew Smallridge // Copyright© 2004-2010 Pavel Baranov // Copyright© 2004-2010 David Hobday // Existing constants predefined for serial hardware driver and software // emulation for the
  2. I would like to use 2 serial ports on a 16f877a. One would be receiving data from a GPS module at 9600 and I think would be better using the built in uart. The second is output only at 2400, sending a data packet of about 30 characters one a second Is this feasible and if so how would I set this up using the ScourceBoost UART template. Thanks
  3. OK - thanks. Using the Wizard helped although still not sure how I lost the 'connection' in the first place. Hey ho! Ted
  4. Are you building a custom version of the library or linking in a supplied version? Ether way this error means that linked can't find this function. Regards Dave I am using a supplied version - novolib_pic16t3e5ts1.lib - which is in c:\Program Files\SourceBoost\Lib I have solved this problem by using the Wizard to build a basic project and then imported my source code. I don't understand how the link to the library was lost though.
  5. Are you building a custom version of the library or linking in a supplied version? Ether way this error means that linked can't find this function. Regards Dave I am using a supplied version - novolib_pic16t3e5ts1.lib - which is in c:\Program Files\SourceBoost\Lib
  6. I have copied ( and possibly corrupted) a Novo project and am getting the following linker error. I think I have misplaced something! Any guidance would be welcomed. Thank Ted Error: Unresolved external function:'SysiWaitSemaphore(unsigned char,unsigned short)' Error: Unresolved external symbol, function:SysiWaitSemaphore Error: Unresolved external function:'SysiWaitSemaphore(unsigned char,unsigned short)' Error: Unresolved external symbol, function:SysiWaitSemaphore
  7. try this: I call this state based routine to parse the incoming NMEA characters for the RMC sentence once I know my GPS is up and running to get the time data I use the PPS as an interrupt to signal this, I then use the PPS to get accurate timing. This code can be adapted for other NMEA sentences. I also use an interrupt driven buffered serial routine - serHasData() checks to see if there is anything in the buffer. Note that the GPS will only give valid time when it has a fix. the A in field 2 indicates a valid time. char parse_RMC( char * buf){ //* Input $GPRMC,193418.00,A
  8. Will this help? On the WIKI The Perfect Second There is a link to the Roman Black timing algorithm "www.RomanBlack.com Zero-error 1 second Timer A very versatile Zero Cumulative Error timing system with PIC source code Roman Black - orig June 2001 - update Aug 2006 - update 21 Nov 2009. What is it? Bresenham's Algorithm is a system where 2 imperfect periods can be alternated to produce an average that matches any "perfect" period. With most modern micros the easiest time period to generate is an overflow of the internal timer, generally 256 ticks or 65536 (256
  9. I recently had to re insatall windows XP and hence all my applications. For SourceBoost once I had re instaled and also run the Registration programme I could not re build my project it was as though the registration had not worked. However by re-compiling all sources then re building all was fine. So the solution was re install, re register, re compile and then re build. Hope this helps. TF
  10. A little time down the line - here is an update. The clocks ( 5 units ) run using NOVO RTOS with three tasks: Task1 - Called every second roll over - semaphore is set by an interrupt on Port B when GPS unit sends the PPS pulse, this resets a millisecond count and calculates the new values for the various time displays and also updates the LED displays. (If for any reason the GPS interrupt does not work then the TMR interrupt is used to set the semaphore when milliseconds reach 1000.) Task 2 - Called every 15 ms - Key board and LCD screen handler - polls the keypad every
  11. If you are using V6.92 then this was indeed a problem that was introduced. This issue is resolved in V6.93. Regards Dave Thanks for the update - every little helps TF
  12. I have used this function and a similar one to swap bytes in a short - thanks.
  13. This sounds like one that we would need a complete project that demonstrates the issue in order to find it.If you can please send the complete project to support@sourceboost.com. Regards Dave OK Thanks zip file on its way Ted
  14. Building... BoostC Optimizing C Compiler Version 6.92 (for PIC16 architecture) http://www.sourceboost.com Copyright(C) 2004-2009 Pavel Baranov Copyright(C) 2004-2009 David Hobday Licensed to Edward Finch under Single user Full License for 1 node(s) Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only TFNovoClock0-1.c C:\Documents and Settings\Ted\My Documents\PIC\working\Mynovo\TFNovoClock0-1.c(382): WARNING: BIT4LO code included C:\Documents and Settings\Ted\My Documents\PIC\working\Mynovo\TFNovoClock0-1.c(407): WARNING: BIT4HI code included C:
  15. Building... BoostC Optimizing C Compiler Version 6.92 (for PIC16 architecture) http://www.sourceboost.com Copyright(C) 2004-2009 Pavel Baranov Copyright(C) 2004-2009 David Hobday Licensed to Edward Finch under Single user Full License for 1 node(s) Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only TFNovoClock0-1.c C:\Documents and Settings\Ted\My Documents\PIC\working\Mynovo\TFNovoClock0-1.c(382): WARNING: BIT4LO code included C:\Documents and Settings\Ted\My Documents\PIC\working\Mynovo\TFNovoClock0-1.c(407): WARNING: BIT4HI code included C:
  16. I am probably overlooking an obvious setting here as the BoostC compiler & linker were working on my project but now the linker does not find obj files. I have a main folder ..\MyNovo and two sub folders ..\myNovo\tflib and ..\myNovo\mxlib each with source code, the compiler saves the obj files to the sub folders. I started getting linker errors saying xxx.obj file could not be opened I solved this by manually moving obj files from the sub folders to the main folder and then linking. This worked but as the compiler and linker have worked for months without this error someth
  17. The MAKESHORT macro uses built-in assembly under the hood. This maker it very efficient but the down side to this efficiency is that it can deal with plain variables only. The macro pretty much puts the macro arguments into the the assembly operators and since assembly doesn't understand arrays (i.e. movf _ucData[5], W) you see these errors. Regards, Pavel PS: From other hand it doesn't look to difficult to add support for array operation that uses const offset into built-in assembly. We'll investigate if this feature can be added to compiler. Thanks for the 2 replies. It does
  18. Not sure I follow your thinking here. I can see this will divide up the buffer into 'bite size chunks' My struggle is with the byte swapping needed to get the 2 or 4 bytes into the correct order. Using the built in MAKESHORT macro gave this error: error: error in built-in assembly - which is a worry as it is defined in boostc.h However on a brighter note I have since found this code snippet at bytes.com although its not loading tonight! UInt16 swap16(UInt16 input) { return ((UInt16)( ((0xFF00 & input) >8) | ((0x00FF & input) << 8))); } UInt32 swap32(UI
  19. I wish to parse a data packet from a GPS module. The packet when receive has 10 bytes, comprising a float, 4 bytes MSB first; a short 2 bytes, MSB first and a float 4 bytes MSB first. The data is received into a buffer. I tried this to swap the 'short' bytes - MAKESHORT( WeekNum, ucData[5], ucData[4] ); //MAKESHORT( dst, lobyte, hibyte ) and got the following error: failure C:\Documents and Settings\Ted\My Documents\PIC\working\Mynovo\tflib\TsipParser.c(315): error: error in built-in assembly To swap the 4 bytes needed for the floats I tried the following code which is based o
  20. Whoops! It was probably because i had included #include <novocfg_pic16t3e5ts1.h> #include <novo.h> twice.
  21. I am getting this output: Building... BoostC Optimizing C Compiler Version 6.87 (for PIC16 architecture) http://www.sourceboost.com Copyright© 2004-2008 Pavel Baranov Copyright© 2004-2008 David Hobday Licensed to Edward Finch under Single user Full License for 1 node(s) Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only TFNovoClock0-1.c failure C:\Program Files\SourceBoost\include\novocfg_pic16t3e5ts1.h(24): error: failure "C:\Program Files\SourceBoost\boostc.pic16.exe" TFNovoClock0-1.c -t PIC16F877A Exit code was 1.
  22. Free supplied Novo RTOS builds only support up to 3 tasks, so you may have to squeeze so tasks together. No, the semaphores are simple counting semaphores. Declare a variable or data struct to carry extra information. Attached is my alarm clock code I did in a couple of hours a while back as a demonstration of some Matrixmultimedia EBlocks. It displays the time on an LCD display, allows the time and alarm time to be set. Take a look, I hope it helps. Regards Dave Thanks for the code - i will take a look. I Think I can work with three tasks i.e. 1 Calculate and
  23. My first PIC project is a Real Time Clock used for start and finish for running events especially orienteering. The system is run from a PIC 16F877 Monotronix board with a RTC, I2C serial LCD Display and key pad , and 2 multi 7 segment LED displays linked by a RS232 link. ( Velleman modules). The LED displays can have different but synchronised times. ( In orienteering runners are called up 3 minutes before their individual start times.) The current system works by polling the RTC and updating the LEDs via RS232 and handles the keycode received and LCD display using a FSM system.
  24. That's nice code. Far easier to read than the boostc 'all things to all people' example. I think that examples, buy their very nature, should be easy to read and not a demonstration of clever multipurpose code using estoeric mechanisms. Simple is good. Thanks for the lead. Rye Pleased to help - i have posted on the Modtronix forum library code to drive their I2C Display board too. Ted
  25. I found the Modtronix demo code a good start for I2C and other coding - I was using their SBC44B board which has 16F877 MPU http://forum.modtronix.com/index.php?topic=321.0
×
×
  • Create New...