Menu

Initializing a parrallax compass

Help
2015-07-30
2015-10-11
<< < 1 2 3 4 > >> (Page 2 of 4)
  • Anobium

    Anobium - 2015-09-05

    The HMC5883L.h include file is the driver for your device. HMC5883L.h is depenent on I2C.H. I2C.H is automatically loaded as you compile your source code. There a host of other files that are loaded during compilation to provide the rich set of commands within Great Cow Basic.

    The rational to ask you to upgrade is. I2C.H does not work correctly in releases prior 2014 and we have fixed many, too many to list, 16F Microchip memory management issues.

    I am about to release another release. In a day or two. And, once this is released I would recommend that everyone upgrades to the latest version to add a host of functionality we have added since March 2015 and to further improved Great Cow Basic's stability.

    Please upgrade and then we have you on a stable version. See the front page of this website for the Download button. https://sourceforge.net/projects/gcbasic/ Please select' Hot Release of Great Cow Basic version 0.94 March 2015' when the next release comes out I would upgrade asap as more 16F memory issues are resolved.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-05

    OK I am downloading hot release will try again next week. I think it is improtant to get this driver to working as it will open up more Pallax sensors like GPS , gryos and accelerometers.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-07

    Hi, I installed hot realse. It made crimson editor quit working! I do not see the connection. Even won't work if I restorw the orignal set up. Do I cannot compile and down load the way I used to. Any ideas on this?
    GCBIDE works OK with new release, but it compiles to the location folder with the file name. Is there any way to set up GCBIDE to put "compiled.asm and .hex" in the GCB root folder, that will make it easier to use. GCBIDE has lousy graphics on my computer. When I get this fixed I can start testing again. Thanks, Ed.

     
  • Anobium

    Anobium - 2015-09-07

    Ed - sorry. Did you backup up your old installation folder? I will revised the download page to make this more clear.

    I am not sure why Crimson does not work but if you over wrote your install then this was probably the cause.

    GCBIDE? I am puzzled. In the Hot Releases since 2013 we have included GCB@Syn. GCB@Syn is an IDE for Great Cow Basic. You start this via IDE.EXE

    When you say GCBIDE has poor graphics. I think you are referring to Great Cow Graphical Basic. As you used Crimson before I would reccomend using GCB@Syn (IDE.EXE).

    GCB@Syn is now maintained with IDE Helpers and inline Help. We are maintaining GCB@Syn going forward.

    Hope this helps.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-07

    Hi started out new with sample code, modified it to work with my serial LCD. Compiles by drag and drop to GCB..exe. Get thsi error "HMC5883L.h <102> syntex error. Reloaded Crimson Editor no change. IDE to confuing for now will take a learning curve.
    Is there any way to set up GCBIDE to put "compiled.asm and .hex" in the GCB root folder, that will make it easier to use. GCBIDE has lousy graphics on my computer. When I get this fixed I can start testing again. Thanks, Ed.

     
  • Anobium

    Anobium - 2015-09-07

    I think so, is this the GCBIDE http://www.freewarefiles.com/GCBIDE_program_38410.html you are using? If can quickly upload (as an attachment) GCBIDE I should be able to get the setup working.

    Meanwhile, in the new GCB@SYN load your source file and press F6 - this should compile your file. Remember to copy HMC5883L.h to the include folder.

     
  • Anobium

    Anobium - 2015-09-07

    Here goes. If your GCBIDE is this one. See http://gcbasic.sourceforge.net/temp/InstallGCBIDE20.exe I just installed. I changed the setup in the 'Environment Setup' to point to GCBASIC.EXE and my programmer. And, compiles, creates ASM and HEX ok.

     
  • Anobium

    Anobium - 2015-09-08

    @Ed. You are totallly correct - there was an error at line 102. I recompile the test code and got the same error here just now.

    Please download from here a new driver that should compile. Please install this new driver in your include folder.

    Really sorry, I added an initialisation of the Hardware I2C at line 102 and I introduced an error. This happens when I do not have the hardware to test. :-) Sorry Ed.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-08

    Hi downloaded new driver same error :HMC5883L.h (102): Error: Syntax Error on my modified progam.
    I downloaded your sample program with no changes get the same error: HMC5883L.h (102): Error: Syntax Error. Now what? Ed.

     
  • Anobium

    Anobium - 2015-09-09

    Odd. Are you sure you have the .h file in the correct folder? Should be in the include folder.

    As you are testing. Comment out line 102. Does this remove the error?

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    amazingly no Have no idea why that is why don't you try it out to see what you get. it did before this time. Ed.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    OK I was too blurry eyed last night to realise I was modifing the .h file in the wrong folder. commenting it out allows it to comile properly. I will have to test it to see if it works later.
    Question was is the purpose of the HIC2Init command? will it work with out it? Thanks, Ed.

     
  • Anobium

    Anobium - 2015-09-09

    I thought is was a file/folder isssue. Phew. I was starting to scratch my head.

    HIC2INIT is a supporting function when you are using harware IC2. We develop drivers that support both software and hardware I2C. HIC2INIT is the explicit method use to setup the hardware I2C module.

    Good luck testing later.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    I think that HIC2Init may be should be HI2CInit. I tryed that and it did not work either.

     
  • Anobium

    Anobium - 2015-09-09

    I just tested the code again on a test rig - all works ok. I used this file https://sourceforge.net/p/gcbasic/code/HEAD/tree/GCBASIC/trunk/include/HMC5883L.h

    I used the Compass demo as my source code.

    Can you attached you latest source code? This will help me.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    Ok here the way it stands now. Using HI2C commands does not work! Not data or clock signals. Changing it to I2C makes it work, data and clock signals Reads all 3 channels as FF. Now were do we go. Note: the HIC2init was commented out maybe that is why HW does not work

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    Forgot this

     
  • Anobium

    Anobium - 2015-09-09

    I am not getting errors here compiling your code.

    There is something odd going on. Can you do a new install? Download the Hot Release, then install the revised .H (download from SourceForge again) and please try to complile the Hot Release IDE, simple press <f6>. If it does not compile then I will ask you to edit the compile batch file to show all the errors.</f6>

     
    • Anobium

      Anobium - 2015-09-09

      I meant - do this in a new installation folder.

       
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    My code does not produce any errors. I modified the .h file. called it SHMC5883L.h to change all HI2C commands to I2C. It compiles without error. Will test it tomorrow. Attached below

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    Could not wait tested it just now. Compiles with no errors. Same result All FF. Your harware I2C does not work. There are no clock and data signals. Hardware I2c Produces no LCD diaplay. With I2C works OK with data and colck siganls and it displays FF.

     
  • Anobium

    Anobium - 2015-09-09

    Please attach your ASM file, please.

    Hardware does not work on the 16f88 as the 16f88 does not have the requuired module. You have to use Software I2C.

    Do you have any tools to see the clock /data signals? I know the SW I2C typically works as I have an extensive test rig for testing prior releasing code - but, I, as you know, do have the same hardware as you. :-(

     
  • Anobium

    Anobium - 2015-09-09

    A few things that have my wondering.

    Why is HIC2 code being referenced when this code should not have compiled? The only way the HIC2 code should be compiled is when you have HIC2_DATA defined - which you do not. This is puzzling me.

    I know the I2C code works. But, when the I have the issue of HIC2 code being compiled when it should not be... really worries me.

    Let me look at the ASM.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    What module do you need? I have these chips:PIC18F2525/2620/4525/4620 will they work?
    Let me know how to proceed.

     
  • Edward LaBudde

    Edward LaBudde - 2015-09-09

    Forgot I have a scope to look at signals

     
<< < 1 2 3 4 > >> (Page 2 of 4)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.