Search found 192 matches

by hcker2000
13 Apr 2011 16:39
Forum: mikroC PRO for PIC General
Topic: Undeclared identifier 'OSCONN'
Replies: 2
Views: 1521

Re: Undeclared identifier 'OSCONN'

Doh! That fixes that.
by hcker2000
13 Apr 2011 16:25
Forum: mikroC PRO for PIC General
Topic: Undeclared identifier 'OSCONN'
Replies: 2
Views: 1521

Undeclared identifier 'OSCONN'

Trying to get this code to compile and its throwing a fit about trying to set the OSCONN. Any ideas? #include <built_in.h> unsigned int adc_rd; void main() { // SET CLOCK TO 8Mhz REF p40 OSCONN.B0 = 0; OSCONN.B1 = 1; OSCONN.B4 = 1; OSCONN.B5 = 1; OSCONN.B6 = 1; // WAIT FOR CLOCK TO STABALIZE while(O...
by hcker2000
10 Apr 2010 15:10
Forum: mikroBasic PRO for PIC General
Topic: Any way to solve this reentrancy problem?
Replies: 1
Views: 1403

Any way to solve this reentrancy problem?

Here is my code thats giving me problems. program wireless_flash_test sub procedure SendRaw(dim sendRawData as word) PORTA.B0 = 0 'DEBUG 'Latch RB3 - nSEL pin low to send more than a single byte command PORTB.B3 = 0 'Sends raw data to rf12b SPI1_Write(Lo(sendRawData)) SPI1_Write(Hi(sendRawData)) 'La...
by hcker2000
10 Apr 2010 01:50
Forum: mikroBasic PRO for PIC General
Topic: Best way to convert word to two bytes?
Replies: 1
Views: 1302

Best way to convert word to two bytes?

I was wondering if there is a better way to do this than just looping threw the 16 bits of the word and while counter is <= 4 store it in a low byte and while its > 4 store it in a high byte?
by hcker2000
28 Mar 2010 23:33
Forum: mikroBasic PRO for PIC General
Topic: RB3 not working as output
Replies: 2
Views: 1594

Re: RB3 not working as output

Thanks. I always get confused as to which way that register should be. That and I think i was planing on using it as a some thing else at one point. Any idea if I am reading my SPI connection correctly?
by hcker2000
28 Mar 2010 22:05
Forum: mikroBasic PRO for PIC General
Topic: RB3 not working as output
Replies: 2
Views: 1594

RB3 not working as output

I am trying to get RB3 to go high on startup. I have an led between RB3 and ground and I have tested the leds to make sure it works. I have also checked to make sure the leds is right way round. Here is my code. If any one see's any thing wrong I would love the help. program wireless_flash_test ' De...
by hcker2000
23 Mar 2010 00:21
Forum: mikroBasic PRO for PIC General
Topic: Unresolved extern 'SPI1_init' wireless_flash_test.mbas error
Replies: 5
Views: 2794

Re: Unresolved extern 'SPI1_init' wireless_flash_test.mbas e

@orga I am working on code that will send and receive. Right now I think I have the send part but I am unsure the best way to read from the RFM12. Here is the code that I have. Lets work together and get it working. program wireless_flash_test ' Declarations section sub procedure SendTrigger 'Latch ...
by hcker2000
21 Mar 2010 00:08
Forum: mikroBasic PRO for PIC General
Topic: Unresolved extern 'SPI1_init' wireless_flash_test.mbas error
Replies: 5
Views: 2794

Re: Unresolved extern 'SPI1_init' wireless_flash_test.mbas e

Thanks very much that fixed the problem. Now I can keep developing.
by hcker2000
20 Mar 2010 23:27
Forum: mikroBasic PRO for PIC General
Topic: Unresolved extern 'SPI1_init' wireless_flash_test.mbas error
Replies: 5
Views: 2794

Unresolved extern 'SPI1_init' wireless_flash_test.mbas error

Here is the code I am trying to compile for the 16f88. program wireless_flash_test ' Declarations section sub procedure SendTrigger 'Latch RB3 - nSEL pin low to send more than a single byte command PORTB.B3 = 0 'Sends command to flash units to flash 'Latch RB3 - nSEL ping high so the rfm12m knows we...
by hcker2000
18 Mar 2010 00:42
Forum: mikroBasic PRO for PIC General
Topic: 16f88 interrupts
Replies: 8
Views: 2946

Re: 16f88 interrupts

Ok so I replaced my interrupt procedure with this from your example and it works. Only weird issue is that when ever I get my hand close to the wire I am using as a switch it triggers that pin to go low. Any ideas about that? sub procedure Interrupt if(INTCON.INTF = 1) then PORTA = %11111111 delay_m...
by hcker2000
17 Mar 2010 13:01
Forum: mikroBasic PRO for PIC General
Topic: 16f88 interrupts
Replies: 8
Views: 2946

Re: 16f88 interrupts

Well crap I took out that INTCON = 0 and still nothing. Any one see any thing else that looks wrong? program wireless_flash_test ' Declarations section sub procedure Interrupt Delay_ms(10) if INTCON.1 = 1 then if PORTA = %11111111 then PORTA = %00000000 else PORTA = %11111111 end if INTCON.1 = 0 Del...
by hcker2000
17 Mar 2010 12:36
Forum: mikroBasic PRO for PIC General
Topic: 16f88 interrupts
Replies: 8
Views: 2946

Re: 16f88 interrupts

doh! thanks for the help.
by hcker2000
17 Mar 2010 02:45
Forum: mikroBasic PRO for PIC General
Topic: 16f88 interrupts
Replies: 8
Views: 2946

16f88 interrupts

I think I have every thing set correctly but the leds on port a are not turning off when RB0 is pulled low. Any ideas? program wireless_flash_test ' Declarations section sub procedure Interrupt Delay_ms(10) if INTCON.1 = 1 then if PORTA = %11111111 then PORTA = %00000000 else PORTA = %11111111 end i...
by hcker2000
15 Mar 2010 01:36
Forum: mikroBasic PRO for PIC General
Topic: 16f88 - 16bit hardware spi?
Replies: 0
Views: 984

16f88 - 16bit hardware spi?

I was wondering if any one has any idea how to send 16bit of data via the hardware spi interface on the 16f88? The reason I ask is that there can not be any delay between the two bytes of data.
by hcker2000
15 Mar 2010 01:16
Forum: mikroBasic PRO for PIC General
Topic: led blink on 16f88
Replies: 3
Views: 2029

Re: led blink on 16f88

wow some thing weird is going on. I updated the code so it should be on for 1ms and off for 1ms and repeat. Now its blinking at about 1/2 seconds which is weird. mikrobasic is set to 8.000mhz. I think there is some way to configure this chip in real time for the speed.

Go to advanced search