Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Dra

  1. Good day Tom and Jorge. The guys at matrix helped me get the serial going. Now the program gets stock in the following loop. What should be taking place and how can I go about troubleshooting it? while (network_in_configmode()){ //wait until we have an IP from the DHCP server (you should add some code to skip this when it fails) clear_wdt(); network_handle_tasks(); }
  2. So this interrupt() fires for all interrupts, and it is the code in the function which checks which interrupt was fired? Could you give some details on the below function. In this case, when does it take place and what does nop() do. Looking through the source boost data sheet I'm still not clear on this: Thanks in advance. void interrupt_low(){ nop(); }
  3. Hi Tom. Looking through the code I don't see where the interrupt() function is being called. How does this work?
  4. Hi Tom. Just discovered the void interrupt(){} is not the code. From the beginning, getting the code to compile in the flow-code environment was a challenge. At some point the interrupt routine must have gotten chopped. It might have been over the issue that when I try to compile with the routine, flowcode returns and error, "void interrupt(){} already has a body". It seem the FC IDE automatically generates an empty interrupt(){}. I have to take this up with the guy a matrixmultimedia. Keep you posted. Thanks for your help.
  5. I let this out. During one of the test I shortened the string but forgot to change the length argument it was still set to 44. Notice that after \r\n the serial continued to print. I would have expected such but what it printed I didn't. Have a look. Once the data is sent my thinking is that the buffer[location] should be cleared(that location in the buffer should have no value/is empty). Below is what printed from this call, "serial_send_data("SPI & SRAM INIT OK, memory test\r\n",44); " SPI & SRAM INIT OK, memory test ory why the "ory" after \r\n?
  6. Thanks. I tried the above and explicitly setting the registers to serial 1 i.e txreg ->txreg1, txsta ->txsta1 etc... I tried using a shorter string and still the same. Looking at the serial_init() and serial_send_data() is there anything that comes to mind, anything I can try that I have missed? void serial_init(){ //pie1.RCIE=1; //enable interrupts trisc.6=1; //enable the outputs/inputs trisc.7=1; txsta1.BRGH=1; baudcon1.BRG16=1; //spbrgh1=1249/256; //16bit brg @ 9600 baud spbrgh1=1040/256; //spbrg1=1249%256; spbrg1= 1040%256; txsta1.SYNC=0; rcsta1.SPEN=1; txs
  7. In flow-code from time to time I would get an issue with the UART not working. I it was brought to my attention that clearing the buffer by doing 3 reads of the UART would clear the issue. And It did. I wonder if that could be an issue here. sp.h has functions to send data. Got any functions to receive data. I have used getc and gets do they work in SourceBoost?
  8. Hi Tom what are the functions for receiving values over serial port? Do use a getc, gets and what are the arguments.? Do you use streams, and how do you identify/setup the streams?
  9. Thank Tom. As you suggested I tried placing a long string at the beginning of my code, and the same thing happened, the print out just stopped in middle of the text at about the same number of characters as before. And at that point the program stops. I place an LED to turn off after the print function and nothing happens.
  10. Thanks Tom. I device got pass the spi_init(); sram_init(); The device now lock up on the following: serial_send_string("SPI & SRAM INIT OK, Performing memory test\r\n"); it prints out: - SPI & SRAM INIT OK, Performing memory The word "test" does not print. It does this consistently. I made changes to the serial_int() to work with my system does this look right? void serial_init(){ //pie1.RCIE=1; //enable interrupts trisc.6=1; //enable the outputs/inputs trisc.7=1; txsta.BRGH=1; baudcon.BRG16=1; //spbrgh1=1249/256; //16bit brg @ 9600 baud spbrgh1=104
  11. Hi Tom. I got the code to compile. I made the changes in the config file. Troubleshooting through the code. I'm having issues with the SRAM. My setup. can you provide the change needed to run my hardware. Thanks in advance. 18f6722 10mhz set to 4x-PLL the ENJ28J60 is connected to the Hardware spi1 ENJ28J60 chip select connected to RD1 23K256 SRAM chip select connected to RD4
  12. Thanks Tom looking at rtc.c, I can see that timer 3 is being used to generate the clock. My chip 18f6722 does have a timer 3. " it look like the issue has something to do with the following define: - "define RTC_INIT_TIMER pie2.TMR3IE=1; t3con.T3CKPS1=1; t3con.T3CKPS0=1; t3con.TMR3CS1=0; t3con.TMR3CS0=0; //code used to init the timer so it can run when RTC_ENABLE_TIMER is set to 1" In particular the "TMR3CS1" of "t3con.TMR3CS1=0" what does it do? And with that since the other timer values don't generate a compiler error can I assume they will work correctly with my chip?
  13. From the guys at flowcode. Could you add any further insite to this? Thanks in advance. spi.c(13:2): error: unknown identifier 'rpinr21' The 18F6722 does not have remappable peripherals, they are fixed in place, so you can safely comment out all of these lines of code. rtc.c(20:67): error: unknown identifier 'TMR3CS1' The 18F6722 also does not have a RTCC peripheral so is there any way to remove these functions from the program. Does the program need RTCC functionality? IPtest.c(410:2): error: unknown identifier 'ancon0' The final set of errors seem to relate
  14. Good day Tom and Jorge. I have a board that uses the 18f6722 device. Trying to compile using this device I got the following errors listed below. Could you give some guidance on the changes needed to get the code to work with my set up. On my board I have the chips hardware spi connected to the SRAM and ENC28J60 module. Thanks in advance. spi.c(13:2): error: unknown identifier 'rpinr21' spi.c(13:2): error: invalid operand 'rpinr21' spi.c(13:9): error: failed to generate expression spi.c(13:13): error: unknown identifier 'rpinr22' spi.c(13:13): error: invalid operand 'rpinr22'
  15. I think am feeling the love here guys. Thanks, I give it a go today. Ondra
  16. Thanks again. Going back to the original file. I downloaded then saved to a different directory. Made the changes you described to the piceth__.c file. Compiled and got the #Debug error. I removed the debug config. Build and compile. Then I got the following error. Looking at the error location. The code looks fine. Any Ideas on this. Building... "C:\program files\SourceBoostC IDE\SourceBoost\boostc_pic18.exe" piceth.c spi.c sp.c SRAM.c rtc.c stack\stackmain.c stack\eth\ENC28J60.c -t PIC18F27J53 -idx 1 -O2 -obj Release -d _RELEASE "C:\program files\SourceBoostC IDE\SourceBoost\boos
  17. Thanks Jorge. If you don't mine could you detail the changes you had to make in the ._c file. Ondra
  18. First of all; Thanks Tom. I spent time this weekend trying to get the piceth._c project to compile. As it is, it did not compile. Going through the files I made changes to the #pragma config list to accommodate the target and crystal I have on my current setup. Again when tried to build the project it failed. A major compile issue I keep running into is: "piceth.c(71): error:" in the piceth.c file their is no code on line 71: I am using the latest version of Sourceboost. Have you tried to compile the project using that version, and should I be using another older version? Curr
  19. Hi Tom. Doing some searching I came by this. Would be aviailable to assist integrating this with my current project. Ondra
  20. Good day all. I have a system that I built using a Pic 18F258. I want to upgrade to the 18F2680. The system as it is has a 20 MHZ crystal and 20pf capacitors. I am using the PIC start plus programmer version made by OLIMEX and the MPLABs IDE for programming. The problem is that when I program the 18f2680 chip for about the second or third time the chip seems to get damaged. In that every time after that I try to program the chip all I get is a list of errors: "Program Memory Errors Address Good Bad 0000: EF6E EF2C 0002: F036 F030 0008: EF72 EF30 000A: F036 F0
  21. Hi all I would like to know how to calculate a float value to 3 places after the decimal point. I Also want to know how to convert that float to a string to send via the RS232 port. Thanks in advance Ondra
  22. Good day all. I would like to get some help calculating distance using a ranging sensor module. Heres what I have. I am using a PIC18F258 with a 19.66MHZ crystal and a Prescaler of 1:8 (2400Hz). Using tmr1 to count down, every 5 sec a macro is called that outputs a 1 to start the ranging unit and enables tmr0 which increments a variable. RB0 interrupt connected to the input from the ranging module stops tmr0. I have the unit connected to hyperterminal. While moving an object back and forth I can see that the numbers printed out are changing and consistant when object is moved. I am ne
  • Create New...