Search found 54 matches

by SNG
06 Jul 2011 16:45
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

@SNG if you check on top of the General Purpose Registers bloc (in PIC18 Simulator IDE), you have a little box named "Real Time Duration" (expressed in microSeconds). This is real time duration of your code if it runs on real PIC hardware. When the leds toogle, you can easily see that this duration...
by SNG
06 Jul 2011 12:13
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

thanks, came already to the same conclusion, after running the simulation with 'PIC18 Simulator IDE' for a while, suddenly the LEDs turned off... so that means Delay_ms(500) is working... I know the simulator timing function is far from realistic but this is ridiculous... in 'normal speed' in the PI...
by SNG
06 Jul 2011 10:14
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

other screenshot of the settings

Image

have also changed the port in the init to LAT, same result
by SNG
06 Jul 2011 10:14
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

removed double post, mouse is getting overheated :lol: :roll:
by SNG
06 Jul 2011 09:40
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

1- Which version of MikroB are you using? 2- Could you post the whole generated ASM code please? I use currently v4.60.0.0 program LEDTEST main: CMCON = 0x07 ' turn off comparators ADCON1 = 0x0F ' turn off analog inputs PORTB = 0 TRISB = %00000000 PORTC = 0 TRISC = %00000000 While TRUE LATB = 0xFF ...
by SNG
06 Jul 2011 09:27
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

p.erasmus Post subject: Re: A simple mistake ! Please help ! Posted: 04 Jan 2011 11:59 Replies: 8 Views: 216 By using a PIC18 you should not use the PORT register you should use LAT register you should read the device data sheet before jumping into programming a device Pal, try using lat register i...
by SNG
06 Jul 2011 09:08
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

piort wrote:hi,
may i suggest to try with osc config at XT ?

HTH
Tested but it didn't help.
Datasheet of the PIC18F458 says also HS for the osc...
by SNG
06 Jul 2011 08:45
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

Re: delay_ms

it's much easier to help seeing some code than theorising on possible causes... Code is very simple program LED main: CMCON = 0x07 ADCON1 = 0x00 PORTB = 0 TRISB = %00000000 While TRUE PORTB.1 = 1 Delay_ms(5000) PORTB.1 = 0 Delay_ms(5000) wend end. MCU: PIC18F458 @ 20 Mhz Oscillator = HS Oscillator ...
by SNG
06 Jul 2011 00:47
Forum: mikroBasic PRO for PIC General
Topic: delay_ms
Replies: 16
Views: 5197

delay_ms

after a long while I started again with programming PICs, think I am very very rusty my code hangs on delay_ms (test it in mBasic and mBasic Pro)... I use the PIC18F458 with a 20 mhz crystal, in project settings I put it on 20 mhz and only turn the oscillator on HS enabled... for the rest nothing, j...
by SNG
09 Nov 2009 05:25
Forum: mikroC General
Topic: Antenna for Wireless
Replies: 9
Views: 3727

http://www.rigolna.com/ Thanks for the link! That are the oscilloscopes I have seen at Sim Lim Towers.... also interested in the waveforms... They are very solid build and reliable what I have heard from the shop... at least they feel like and not as the usual Chinese stuff.... quality is improving...
by SNG
09 Nov 2009 04:46
Forum: mikroC General
Topic: Antenna for Wireless
Replies: 9
Views: 3727

Yeah, poor quality Chinese parts can be a problem - especially here in Thailand. The problem is made all the more confusing because there are now some extremely good products coming from China; we bought some Rigol (proudly Chinese) test equipment earlier this year and it is just superb, great valu...
by SNG
09 Nov 2009 03:53
Forum: mikroC General
Topic: Antenna for Wireless
Replies: 9
Views: 3727

You can better visit SIM LIM TOWERS, opposite of Sim Lim Square. Is the heaven for an electronics geek.... Indeed. I am familiar with both shopping malls, although Sim Lim Towers has become very expensive over recent years and, generally speaking, it is cheaper to shop online. Unfortunately I don't...
by SNG
09 Nov 2009 00:16
Forum: mikroC General
Topic: Antenna for Wireless
Replies: 9
Views: 3727

...However, if you go to UF Technologies (3rd floor Sim Lim Square), you will be able to buy a couple of 433MHz antennae for a few SGD's! You can better visit SIM LIM TOWERS, opposite of Sim Lim Square. Is the heaven for an electronics geek. More then 40 electronica shops on 4 floors in a shopping ...
by SNG
22 Apr 2009 00:03
Forum: mikroBasic General
Topic: PORTA as Digital I/O
Replies: 5
Views: 2978

Thanks for explaining. Problem is that I need a PIC with CAN support, so I've to use the P18Fxx8(0) series I'm afraid... don't want use SPI-CAN, it is slower and love to keep the design small as possible. YES I did read the datasheet but chapter 9 instead of chapter 20. Think to find it within the I...
by SNG
21 Apr 2009 13:17
Forum: mikroBasic General
Topic: PORTA as Digital I/O
Replies: 5
Views: 2978

ADCON1 = 7 CMCON = 7 When I replace it into ADCON1 = 7 'Set ports as Analog (0) or Digital (1) CMCON = 7 PORTA = 0 TRISA = %0000001 'Set ports as Output (0) or Input (1) I get the compiler error Linker error: Bad absolute address CMCON P18F258.pbas When I remove the CMCON line, it compiles and it w...

Go to advanced search