caramoan tour package

caramoan tour package

Author Topic: RTOS for mini MOBOT  (Read 4460 times)

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
RTOS for mini MOBOT
« on: April 02, 2008, 12:03:46 AM »
yahoooo... 95% na ang hardware ng mini mobot ko..  ;D
(almost complete na kasi... kasi wala na akong pandagdag ng mga pyesa,
  like yung sensors.. 2 pairs lang ang available sa'kin, kaya left and right lang..  :'( )


problem ko ngayon is wala pa akong main program para dito..
although nakapag-start na ako kanina ng mga simple routines like obstacle detection,
kulang na kulang pa 'to para ma-control ang buong mobot (obstacle avoiding mobot)..  :'(


top view


bottom view

I'm planning to implement RTOS (real time operating system) for this personal project,
pero di ko pa alam kung paano..  :'(
at least may idea ako kung ano gusto ko,
gusto ko sana na habang umaandar sya, eh nagde-detect o nag-i-scan rin sya ng mga obstacles..
ang clock pala ng pic16lf73 ko ngayon is only 23kHz..
sinet ko sya sa around 20KHz for the purpose of less power consumption..  ::)

any ideas are very welcome..  :D
hindi lang sana RTOS, pati control system na rin, kung applicable dito.. ahihihi  :D
thanks in advance..
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Philippine Electronics Forum

RTOS for mini MOBOT
« on: April 02, 2008, 12:03:46 AM »

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: RTOS for mini MOBOT
« Reply #1 on: April 02, 2008, 12:16:28 AM »
Maganda ang project mo, ang liit ng mobot. cute hhehe

im learning how to use Salvo RTOS kaso wala pa akong nacocompile na succesful projects the past 3 days. Kakainis! I have problems on the configuring the salvocfg.h file hahayzzz

After mapagana ko i'll try it on a line following mobot also. Gusto ko rin gamitin yung "tiny thread" ni Zerwoing later on
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Philippine Electronics Forum

Re: RTOS for mini MOBOT
« Reply #1 on: April 02, 2008, 12:16:28 AM »

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10766
  • Pogi/Ganda Points: 635
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: RTOS for mini MOBOT
« Reply #2 on: April 02, 2008, 12:31:02 AM »
pwede mong i-try muna polled lang yung sensors using timers...

mas ok yung "tiny thread" ni sir zerowing dito kasi 1 byte lang ang transfer...

ok yan ah...konti lang ang laki sa piso... ;D
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Philippine Electronics Forum

Re: RTOS for mini MOBOT
« Reply #2 on: April 02, 2008, 12:31:02 AM »

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
Re: RTOS for mini MOBOT
« Reply #3 on: April 02, 2008, 12:31:29 AM »
im learning how to use Salvo RTOS kaso wala pa akong nacocompile na succesful projects the past 3 days. Kakainis! I have problems on the configuring the salvocfg.h file hahayzzz
pang-PIC ba yang Salvo RTOS ?  ???
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Philippine Electronics Forum

Re: RTOS for mini MOBOT
« Reply #3 on: April 02, 2008, 12:31:29 AM »

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
Re: RTOS for mini MOBOT
« Reply #4 on: April 02, 2008, 12:32:51 AM »
pwede mong i-try muna polled lang yung sensors using timers...
as in timer interrupt???
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Philippine Electronics Forum

Re: RTOS for mini MOBOT
« Reply #4 on: April 02, 2008, 12:32:51 AM »

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: RTOS for mini MOBOT
« Reply #5 on: April 02, 2008, 12:37:02 AM »
pang-PIC ba yang Salvo RTOS ?  ???

Yes. Meron din support for others MCUs, like atmel, motoroal, cortex-m3, 8051

ito site nila

www.pumpkininc.com

I-recommend reading the salvo rtos usermanual for discussion on RTOS fundamentals. Naintidihan ko easily, problem ko nalang right now is im failing in my project build.
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10766
  • Pogi/Ganda Points: 635
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: RTOS for mini MOBOT
« Reply #6 on: April 02, 2008, 12:37:28 AM »
as in timer interrupt???

yup...

sample: every 50ms poll mo kung ano nangyari sa sensor...ang main program mo mag-respond lang sa data galing sa poll nung timer...
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10766
  • Pogi/Ganda Points: 635
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: RTOS for mini MOBOT
« Reply #7 on: April 02, 2008, 12:39:26 AM »
maganda nga yung discussion sa Salvo...
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
Re: RTOS for mini MOBOT
« Reply #8 on: April 02, 2008, 07:50:18 AM »
If you are using PIC18 and above, there is a free RTOS alternative that is FREERTOS http://www.freertos.org .
Supports also other popular processors. I have used this on my data logging gps project here http://geekzone.freehostia.com/archives/6 .
The Cebuano Geek

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
Re: RTOS for mini MOBOT
« Reply #9 on: April 02, 2008, 09:34:34 AM »
If you are using PIC18 and above, there is a free RTOS alternative that is FREERTOS http://www.freertos.org .
sayang.. pic16LF73 lang ang gamit ko..  :(
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
Re: RTOS for mini MOBOT
« Reply #10 on: April 02, 2008, 09:42:44 AM »
ah..  :D
paano nga pala mag-PWM (dc motor) control sa pic ?  ???
paano ang code nya sa 23kHz na clock ?  ???
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
Re: RTOS for mini MOBOT
« Reply #11 on: April 02, 2008, 10:33:45 AM »
Use the CCP peripheral.
-Clear the TRIS of the CCPx output.
-Set bit3 and bit2 of CCPxCON to high and PWM mode will run.
-Set PR2 for the period
-Set CCPRxL + CCPxCONbits 5 and 4 as the duty cycle.
-Turn on Timer2
The Cebuano Geek

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
Re: RTOS for mini MOBOT
« Reply #12 on: April 02, 2008, 11:19:00 AM »
Use the CCP peripheral.
-Clear the TRIS of the CCPx output.
-Set bit3 and bit2 of CCPxCON to high and PWM mode will run.
-Set PR2 for the period
-Set CCPRxL + CCPxCONbits 5 and 4 as the duty cycle.
-Turn on Timer2
meron palang built-in PWM ang pic.. ahihihi..  :D
hmmm.. naisip ko tuloy.. parang kahit hindi na RTOS ang gamitin, pwede pa rin..
itong PWM lang saka timer interrupt lang pa ra sa sensors OK na..  ::)  ???
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10766
  • Pogi/Ganda Points: 635
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: RTOS for mini MOBOT
« Reply #13 on: April 02, 2008, 01:31:48 PM »
pwede... ;D
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: RTOS for mini MOBOT
« Reply #14 on: April 04, 2008, 09:39:41 AM »
finally napaandar ko rin my first salvo rtos application hehe. A simple modified blinker project with delay  ;D

from now on salvo is a part of my embedded programming life. very very useful!
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
Re: RTOS for mini MOBOT
« Reply #15 on: April 04, 2008, 09:59:17 AM »
finally napaandar ko rin my first salvo rtos application hehe. A simple modified blinker project with delay  ;D

from now on salvo is a part of my embedded programming life. very very useful!
full version ba yan ?  ::)

parang basic lang kasi ang paggamit ng interrupt (walang challenge.. hehe  ;D)
ang bago pa lang, yung di ko pa nata-try is yung built-in PWM module ng pic..
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: RTOS for mini MOBOT
« Reply #16 on: April 04, 2008, 10:10:57 AM »
full version ba yan ?  ::)

parang basic lang kasi ang paggamit ng interrupt (walang challenge.. hehe  ;D)
ang bago pa lang, yung di ko pa nata-try is yung built-in PWM module ng pic..

yup its full version salvo rtos
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10766
  • Pogi/Ganda Points: 635
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: RTOS for mini MOBOT
« Reply #17 on: April 04, 2008, 10:20:15 AM »
hehehe...pag sanay ka na dun sa usual programming, wala na talaga challenge yung mga simple tasks...

yung 2.2 ginamit mo sir paranz?

FreeRTOS pinag-aaralan ko ngayon, pero yung headers...hehehe...
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: RTOS for mini MOBOT
« Reply #18 on: April 04, 2008, 12:30:41 PM »
hehehe...pag sanay ka na dun sa usual programming, wala na talaga challenge yung mga simple tasks...

yung 2.2 ginamit mo sir paranz?

FreeRTOS pinag-aaralan ko ngayon, pero yung headers...hehehe...

im not sure anong version, but its a "free version"  ;D

in fact im not sure what i did, basta umandar na. Its time to review ano ginawa ko bakit gumana  ;D
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline celdricg

  • Size AA Battery
  • ****
  • Posts: 113
  • Pogi/Ganda Points: 3
    • http://www.bobongbooks.com/
Re: RTOS for mini MOBOT
« Reply #19 on: April 04, 2008, 03:36:56 PM »
Try mo microCos/ uCos-II
download here: http://www.micrium.com/products/rtos/ucos-ii_download.html

maganda yan kaso depende rin sa microcon mo kung naka port na kung gusto mo ikaw na lang mag port pero since bago ka pa yata sa RTOS mahihirapan ka, so hanap ka na lang ng mga micro con na na nakaport... alam ko marami sa atmel, sa Zilog wala yata...

Philippine Electronics Forum

Re: RTOS for mini MOBOT
« Reply #19 on: April 04, 2008, 03:36:56 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com