SK40C Beginner

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Re: SK40C Beginner

Postby robosang » Mon Feb 20, 2012 8:31 pm

Brian,

Good motivation, it was back in 2004 to 2005, started with Handy board, when turn to PIC, I was stuck at Assembly and the configuration bits! Loading program is slow like hell and there is no on board ICSP, I need to plug and unplug :mrgreen: But hey, is satisfying when you get your stuff work, I am sure you have that feeling too.

Anyway, I think Brian and me, and I am sure other also been through all the hard time, is the process of learning! So just enjoy it 8-)

So how is your RTOS working?
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: SK40C Beginner

Postby Brian Griffin » Mon Feb 20, 2012 9:12 pm

robosang WROTE:Brian,

Good motivation, it was back in 2004 to 2005, started with Handy board, when turn to PIC, I was stuck at Assembly and the configuration bits! Loading program is slow like hell and there is no on board ICSP, I need to plug and unplug :mrgreen: But hey, is satisfying when you get your stuff work, I am sure you have that feeling too.

Anyway, I think Brian and me, and I am sure other also been through all the hard time, is the process of learning! So just enjoy it 8-)

So how is your RTOS working?


You are pretty a veteran here. Those times, all are started with a PIC16F84 and some electronic components, plus an expensive programmer. I started from a PICKit 2, so I'm considered very late.

Back in '99 when I got some electronic magazines cheap from the MPH clearence sale, I found ads for Basic Stamp, but didn't pestered my father to buy them. I should have started earlier, but hey, it's easier to do microcontrollers nowadays too.

The FreeRTOS is already there for the SKPIC32, with the latest version. I was about to make a mini-game out with the GLCD out of it but work's piling up on me, so didn't do anything on it.

In fact, there are RTOSes for PIC16 and PIC18F. One of the RTOS I got is successfully programmed and I manage to simulate it in Proteus. If I have a spare bit of time I would port Myke Predko's example of his RTOS "digital thermometer clock" into the SK40C. I will use MikroC and also MPLAB C18 to implement this, and prolly you will be seeing one more of this in the tutorial section. :)
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: SK40C Beginner

Postby vick5821 » Mon Feb 20, 2012 11:55 pm

I just scared that the SK40C I got got some problems ma..haha
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby vick5821 » Tue Feb 21, 2012 1:04 am

In project o, what does the __delay_ms(1) means ? Do not quite get the explanation :(
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby robosang » Tue Feb 21, 2012 9:22 pm

vick5821 WROTE:I just scared that the SK40C I got got some problems ma..haha


It might be SK40C problem but you can check it, as hyng suggested, you can try to load the sample code from their product page. I did use that before, the LEDs will blink alternately. Press switch will change the blinking rate.

I have once get a faulty SK40C, but Cytron call back to repair and send me a voucher :) After that, it works fine! I have a few projects using SK40C with different PIC, 16F and 18F.

Brian Griffin WROTE:You are pretty a veteran here. Those times, all are started with a PIC16F84 and some electronic components, plus an expensive programmer. I started from a PICKit 2, so I'm considered very late.

Back in '99 when I got some electronic magazines cheap from the MPH clearence sale, I found ads for Basic Stamp, but didn't pestered my father to buy them. I should have started earlier, but hey, it's easier to do microcontrollers nowadays too.

The FreeRTOS is already there for the SKPIC32, with the latest version. I was about to make a mini-game out with the GLCD out of it but work's piling up on me, so didn't do anything on it.

In fact, there are RTOSes for PIC16 and PIC18F. One of the RTOS I got is successfully programmed and I manage to simulate it in Proteus. If I have a spare bit of time I would port Myke Predko's example of his RTOS "digital thermometer clock" into the SK40C. I will use MikroC and also MPLAB C18 to implement this, and prolly you will be seeing one more of this in the tutorial section. :)

No.... not veteran, just a busy body, you are moving faster. I have yet to touch 32-bit, you already playing with RTOS. Anyway, keep it going, thanks for the sharing.

You write tutorial to Cytron site? Which one is yours? Should have something to do with 32-bit, right? Since you are good in that :)

Keep it up man! Kudos to you!
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: SK40C Beginner

Postby vick5821 » Tue Feb 21, 2012 9:41 pm

Whcih coding ? Project 0?
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby ABSF » Tue Feb 21, 2012 10:23 pm

robosang WROTE:It might be SK40C problem but you can check it, as hyng suggested, you can try to load the sample code from their product page.


The sample program is "PIC16F Sample Source Code"  from
http://www.cytron.com.my/viewProduct.php?pcode=SK40C&name=Enhanced%2040%20pins%20PIC%20Start-Up%20Kit

vick5821 WROTE:In project o, what does the __delay_ms(1) means ? Do not quite get the explanation :(


__delay_ms(1);
This is the macro from HI-TECH complier which will generate 1ms delay base on value of _XTAL_FREQ.

In this case, a macro is written in asm and put inside the HTC compiler. If you want to know how to generate exactly 1 ms delay, you have to know a little assembly language. See here

PicLoops Download Center
http://www.biltronix.com/picloops.html

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: SK40C Beginner

Postby vick5821 » Tue Feb 21, 2012 11:41 pm

I loaded the program..very weird..the RB6 and RB7 the LED got blink alternatly but when I press the switch, the rate does not increases.

See the video below :
http://www.youtube.com/watch?v=BULEBOH- ... e=youtu.be

It's quite weird btw.When I press either one switch, the two LED will either HIGH or LOW..

so SK40C problem or
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby Brian Griffin » Wed Feb 22, 2012 12:23 am

vick5821 WROTE:I loaded the program..very weird..the RB6 and RB7 the LED got blink alternatly but when I press the switch, the rate does not increases.

See the video below :
http://www.youtube.com/watch?v=BULEBOH- ... e=youtu.be

It's quite weird btw.When I press either one switch, the two LED will either HIGH or LOW..

so SK40C problem or


What are you trying to do with the SK40C? Sorry for being a bit confused here - at least you need to tell us what you want to do with the SK40C.

Let me guess... are you trying to change LED blinking speed at the press of the buttons?
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: SK40C Beginner

Postby vick5821 » Wed Feb 22, 2012 2:19 am

This is according to what they said..the rate will change upon pressing the button
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

PreviousNext

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 3 guests